mirror of
https://github.com/jlengrand/web-brain.git
synced 2026-03-10 08:51:21 +00:00
23 lines
582 B
TypeScript
23 lines
582 B
TypeScript
import { html } from 'lit';
|
|
import { fixture, expect } from '@open-wc/testing';
|
|
|
|
import { WebBrain } from '../src/WebBrain.js';
|
|
import '../src/web-brain.js';
|
|
|
|
describe('WebBrain', () => {
|
|
let element: WebBrain;
|
|
beforeEach(async () => {
|
|
element = await fixture(html`<web-brain></web-brain>`);
|
|
});
|
|
|
|
it('renders a h1', () => {
|
|
const h1 = element.shadowRoot!.querySelector('h1')!;
|
|
expect(h1).to.exist;
|
|
expect(h1.textContent).to.equal('My app');
|
|
});
|
|
|
|
it('passes the a11y audit', async () => {
|
|
await expect(element).shadowDom.to.be.accessible();
|
|
});
|
|
});
|