use fixture types consistently

This commit is contained in:
Cory LaViska
2021-08-10 17:11:07 -04:00
parent 2b12a47915
commit 3bb8614143
14 changed files with 125 additions and 109 deletions

View File

@@ -6,7 +6,9 @@ import type SlInclude from './include';
describe('<sl-include>', () => {
it('should load content and emit sl-load', async () => {
const el = await fixture(html` <sl-include src="https://jsonplaceholder.typicode.com/posts/1"></sl-include> `);
const el = await fixture<SlInclude>(
html` <sl-include src="https://jsonplaceholder.typicode.com/posts/1"></sl-include> `
);
const loadHandler = sinon.spy();
el.addEventListener('sl-load', loadHandler);
@@ -17,7 +19,7 @@ describe('<sl-include>', () => {
});
it('should emit sl-error when content cannot be loaded', async () => {
const el = await fixture(html` <sl-include src="https://404"></sl-include> `);
const el = await fixture<SlInclude>(html` <sl-include src="https://404"></sl-include> `);
const loadHandler = sinon.spy();
el.addEventListener('sl-error', loadHandler);