Skip to content

Commit

Permalink
test(page): add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lingbopro committed Jan 20, 2025
1 parent d7fe880 commit 68065c4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/components/page.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { expect, fixture, html } from '@open-wc/testing';
import { Page } from '../../dist/components/page';

describe('Page', () => {
it('should be defined', async () => {
const el = await fixture<Page>(html`<mm-page></mm-page>`);
expect(el).to.be.instanceOf(Page);
});

it('should have shadow root and elements inside it', async () => {
const el = await fixture<Page>(html`<mm-page></mm-page>`);
const shadowRoot = el.shadowRoot;
expect(shadowRoot).to.be.instanceof(ShadowRoot);
expect(shadowRoot?.querySelector('slot')).to.be.instanceOf(HTMLElement);
});
});

0 comments on commit 68065c4

Please sign in to comment.