UNPKG

v4web-components

Version:
37 lines (36 loc) 1.24 kB
import { newSpecPage } from '@stencil/core/testing'; import { LabDsFilterChip } from './lab-ds-filter-chip'; describe('v4-filter-chip', () => { it('renders', async () => { const page = await newSpecPage({ components: [LabDsFilterChip], html: `<lab-ds-filter-chip label="label" />`, }); expect(page.root).toEqualHtml(` <lab-ds-filter-chip label="label"> <mock:shadow-root> <button class="medium false filter-chip"> <span class="label">label</span> </button> </mock:shadow-root> </lab-ds-chip> `); }); it('renders selected', async () => { const page = await newSpecPage({ components: [LabDsFilterChip], html: `<lab-ds-filter-chip selected={true} label="label" />`, }); expect(page.root).toEqualHtml(` <lab-ds-filter-chip selected="{true}" label="label"> <mock:shadow-root> <button class="medium selected filter-chip"> <span class="label">label</span> <lab-ds-icon-not-selectable class="holder" icon="check" size="small"></lab-ds-icon-not-selectable> </button> </mock:shadow-root> </lab-ds-chip> `); }); }); //# sourceMappingURL=lab-ds-filter-chip.spec.js.map