mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
mock electron log in all tests
This commit is contained in:
parent
1a77cb0e90
commit
42edc38413
@ -18,6 +18,8 @@ const getMainWindow = {
|
|||||||
setFullScreenable: jest.fn(),
|
setFullScreenable: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
jest.mock('electron-log');
|
||||||
|
|
||||||
jest.mock('../src/common/env', () => {
|
jest.mock('../src/common/env', () => {
|
||||||
return {
|
return {
|
||||||
isWindowsOS: true,
|
isWindowsOS: true,
|
||||||
@ -52,6 +54,20 @@ jest.mock('../src/app/window-actions', () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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('child window handle', () => {
|
describe('child window handle', () => {
|
||||||
const frameName = {};
|
const frameName = {};
|
||||||
const disposition = 'new-window';
|
const disposition = 'new-window';
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
jest.mock('electron-log');
|
||||||
|
|
||||||
jest.mock('../src/app/window-actions', () => {
|
jest.mock('../src/app/window-actions', () => {
|
||||||
return {
|
return {
|
||||||
activate: jest.fn(),
|
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', () => {
|
describe('protocol handler', () => {
|
||||||
let protocolHandlerInstance;
|
let protocolHandlerInstance;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user