mock electron log in all tests

This commit is contained in:
Vishwas Shashidhar
2020-09-25 15:16:33 +05:30
parent 1a77cb0e90
commit 42edc38413
2 changed files with 35 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
jest.mock('electron-log');
jest.mock('../src/app/window-actions', () => {
return {
activate: jest.fn(),
@@ -18,6 +20,20 @@ jest.mock('../src/common/env', () => {
};
});
jest.mock('../src/common/logger', () => {
return {
logger: {
setLoggerWindow: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
info: jest.fn(),
verbose: jest.fn(),
debug: jest.fn(),
silly: jest.fn(),
},
};
});
describe('protocol handler', () => {
let protocolHandlerInstance;