Skip to content

Commit 7626064

Browse files
committed
lint fix
1 parent a7f5c97 commit 7626064

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/renderer/utils/__tests__/theme-manager.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function setupDOM() {
99
const styles: Record<string, string> = {};
1010
const attrs: Record<string, string> = {};
1111
let dropdownValue = '';
12-
const listeners: Record<string, Function[]> = {};
12+
const listeners: Record<string, ((...args: unknown[]) => void)[]> = {};
1313

1414
// document.body.setAttribute
1515
document.body.setAttribute = vi.fn((k, v) => {
@@ -29,10 +29,12 @@ function setupDOM() {
2929
set value(v: string) {
3030
dropdownValue = v;
3131
},
32-
addEventListener: vi.fn((event: string, handler: Function) => {
33-
if (!listeners[event]) listeners[event] = [];
34-
listeners[event].push(handler);
35-
}),
32+
addEventListener: vi.fn(
33+
(event: string, handler: (...args: unknown[]) => void) => {
34+
if (!listeners[event]) listeners[event] = [];
35+
listeners[event].push(handler);
36+
}
37+
),
3638
};
3739
vi.spyOn(document, 'getElementById').mockReturnValue(
3840
dropdownEl as unknown as HTMLElement

0 commit comments

Comments
 (0)