import '../../../dist/zn.min.js'; import { expect, fixture, html } from '@open-wc/testing'; describe('', () => { it('should render a component', async () => { const el = await fixture(html` `); expect(el).to.exist; }); it('should fill its parent container height', async () => { const parent = await fixture(html`
Content
`); const el = parent.querySelector('zn-sp')!; const base = el.shadowRoot!.querySelector('[part="base"]')!; expect(el.getBoundingClientRect().height).to.equal(300); expect(base.getBoundingClientRect().height).to.equal(300); }); });