Skip to content

Commit 10dff85

Browse files
committed
setupTests: clean non-used code
1 parent 75d3b30 commit 10dff85

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

setupTests.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
1-
import { jest, expect } from '@jest/globals';
1+
import { expect } from '@jest/globals';
22
import '@testing-library/jest-dom';
33
import { TestingLibraryMatchers } from '@testing-library/jest-dom/types/matchers-standalone';
44

55
declare module '@jest/expect' {
6+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
67
export interface Matchers<R>
78
extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
89
}
9-
10-
Object.defineProperty(window, 'matchMedia', {
11-
writable: true,
12-
value: jest.fn().mockImplementation((query) => ({
13-
matches: false,
14-
media: query,
15-
onchange: null,
16-
addListener: jest.fn(), // deprecated
17-
removeListener: jest.fn(), // deprecated
18-
addEventListener: jest.fn(),
19-
removeEventListener: jest.fn(),
20-
dispatchEvent: jest.fn(),
21-
})),
22-
});

0 commit comments

Comments
 (0)