2021-08-14 15:46:21 +00:00
|
|
|
import '@testing-library/jest-dom/extend-expect'
|
2021-09-08 16:18:43 +00:00
|
|
|
import 'fake-indexeddb/auto'
|
|
|
|
global.ResizeObserver = require('resize-observer-polyfill')
|
2022-07-07 10:59:47 +00:00
|
|
|
|
|
|
|
Object.defineProperty(window, 'matchMedia', {
|
|
|
|
writable: true,
|
|
|
|
value: jest.fn().mockImplementation((query) => ({
|
|
|
|
matches: false,
|
|
|
|
media: query,
|
|
|
|
onchange: null,
|
|
|
|
addListener: jest.fn(), // Deprecated
|
|
|
|
removeListener: jest.fn(), // Deprecated
|
|
|
|
addEventListener: jest.fn(),
|
|
|
|
removeEventListener: jest.fn(),
|
|
|
|
dispatchEvent: jest.fn(),
|
|
|
|
})),
|
|
|
|
})
|