forked from Github/frigate
test(web): add unit test framework
This commit is contained in:
committed by
Blake Blackshear
parent
daa759cc55
commit
a803ab8577
14
web/config/setupTests.js
Normal file
14
web/config/setupTests.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'regenerator-runtime/runtime';
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true,
|
||||
value: (query) => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addEventListener: jest.fn(),
|
||||
removeEventListener: jest.fn(),
|
||||
dispatchEvent: jest.fn(),
|
||||
}),
|
||||
});
|
||||
Reference in New Issue
Block a user