We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2c3f04 commit 7dfc8fdCopy full SHA for 7dfc8fd
packages/svelte-query/tests/vitest-setup-client.ts
@@ -1,18 +1,18 @@
1
-import '@testing-library/jest-dom/vitest';
2
-import { vi } from 'vitest';
+import '@testing-library/jest-dom/vitest'
+import { vi } from 'vitest'
3
4
// required for svelte5 + jsdom as jsdom does not support matchMedia
5
Object.defineProperty(window, 'matchMedia', {
6
writable: true,
7
enumerable: true,
8
- value: vi.fn().mockImplementation(query => ({
+ value: vi.fn().mockImplementation((query) => ({
9
matches: false,
10
media: query,
11
onchange: null,
12
addEventListener: vi.fn(),
13
removeEventListener: vi.fn(),
14
dispatchEvent: vi.fn(),
15
})),
16
-});
+})
17
18
// add more mocks here if you need them
0 commit comments