Refactor Stella plugin
Summary: 1. Replace old FileSelector with the new FileSelector 2. Remove showOpenDialog from FlipperLib Reviewed By: mweststrate Differential Revision: D32667103 fbshipit-source-id: be8da034c2695f83b397b6c7d35bc6aee78d66e5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b82c41eedd
commit
225a2a7e34
@@ -38,3 +38,18 @@ afterEach(cleanup);
|
||||
console.debug = function () {
|
||||
// Intentional noop, we don't want debug statements in Jest runs
|
||||
};
|
||||
|
||||
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
|
||||
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(),
|
||||
})),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user