Use jest to mock electron in tests
Summary: Replacing our custom electron-stubs transform with a mocked module. This will now be the default impl for tests, and we can override it by mocking as needed. Reviewed By: passy Differential Revision: D17979659 fbshipit-source-id: a26994158d439fa7dc1ca38225294106fc4e1559
This commit is contained in:
committed by
Facebook Github Bot
parent
14dd792829
commit
fdee0ef7b7
@@ -7,6 +7,13 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
jest.mock('../fb-stubs/Logger');
|
||||
try {
|
||||
jest.mock('../fb/Logger');
|
||||
} catch {
|
||||
// Allowed to fail when fb modules are not present.
|
||||
}
|
||||
|
||||
import Server from '../server';
|
||||
import {init as initLogger} from '../fb-stubs/Logger';
|
||||
import reducers, {Store} from '../reducers/index';
|
||||
|
||||
Reference in New Issue
Block a user