import { html, fixture, expect } from '@open-wc/testing';
import type { MonoDescriptionListComp } from '../src/MonoDescriptionListComp';
import '../src/MonoDescriptionListComp';
describe('MonoDescriptionListComp', () => {
it('handle values', async () => {
const values = [
{
key: 'Hello',
value: 'test',
},
];
const el = await fixture(
html` `,
);
expect(el.values[0].key).to.equal('Hello');
});
it('values should be by default empty', async () => {
const el = await fixture(
html``,
);
expect(el.values.length).to.equal(0);
});
it('should spreads other attributes', async () => {
const el = await fixture(
html``,
);
expect(el.shadowRoot?.firstElementChild?.getAttribute('fake')).to.equal(
'test',
);
});
it('passes the a11y audit', async () => {
const el = await fixture(
html``,
);
await expect(el).shadowDom.to.be.accessible();
});
});