Skip to content

Commit 05c519b

Browse files
committed
add type for custom element in test
1 parent d32b104 commit 05c519b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { defineCustomElement } from "./index";
44
describe("defineCustomElement", () => {
55
let customElementsDefineSpy: ReturnType<typeof vi.spyOn>;
66
let customElementsGetSpy: ReturnType<typeof vi.spyOn>;
7-
let Component;
7+
let Component: CustomElementConstructor;
88
let tagName: string;
99

1010
beforeEach(() => {
@@ -28,7 +28,7 @@ describe("defineCustomElement", () => {
2828
defineCustomElement(tagName, Component);
2929

3030
expect(customElementsGetSpy).toHaveBeenCalledWith(tagName);
31-
// we still expect this to be called once because of the conditional check
31+
// we still expect this to be called once because of the conditional check in our function
3232
expect(customElementsDefineSpy).toHaveBeenCalledTimes(1);
3333
});
3434
});

0 commit comments

Comments
 (0)