UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

37 lines (36 loc) 1.32 kB
/*! * KoliBri - The accessible HTML-Standard */ import { h } from "@stencil/core"; import { newSpecPage } from "@stencil/core/testing"; import CustomSuggestionsOptionFc from "../CustomSuggestionsOption"; describe('CustomSuggestionsOption', () => { const defaultProps = { disabled: false, index: 0, option: 'Test Option', selected: false, }; it('renders default state', async () => { const page = await newSpecPage({ components: [], template: () => h(CustomSuggestionsOptionFc, Object.assign({}, defaultProps)), }); expect(page.root).toMatchSnapshot(); }); it('renders selected state', async () => { const page = await newSpecPage({ components: [], template: () => h(CustomSuggestionsOptionFc, Object.assign({}, defaultProps, { selected: true })), }); expect(page.root).toMatchSnapshot(); }); it('renders with different index and option', async () => { const page = await newSpecPage({ components: [], template: () => h(CustomSuggestionsOptionFc, Object.assign({}, defaultProps, { index: 2, option: "Different Option" })), }); expect(page.root).toMatchSnapshot(); }); }); //# sourceMappingURL=snapshot.test.js.map