[MM-41999] Add additional logging for debugging, allow users to change log level (#2031)
* Add debug logging switch * Add tests * Mock electron-log globally in jest * New logs for debugging * Switch to a dropdown to choose log levels * Fix tests * Update wording
This commit is contained in:
@@ -63,12 +63,6 @@ jest.mock('electron-devtools-installer', () => {
|
||||
const isDev = false;
|
||||
jest.mock('electron-is-dev', () => isDev);
|
||||
|
||||
jest.mock('electron-log', () => ({
|
||||
info: jest.fn(),
|
||||
warn: jest.fn(),
|
||||
error: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('../../../electron-builder.json', () => ([
|
||||
{
|
||||
name: 'Mattermost',
|
||||
@@ -245,7 +239,7 @@ describe('main/app/initialize', () => {
|
||||
path.resolve.mockImplementation((base, p) => `${base}/${p}`);
|
||||
session.defaultSession.on.mockImplementation((event, cb) => {
|
||||
if (event === 'will-download') {
|
||||
cb(null, item, {id: 0});
|
||||
cb(null, item, {id: 0, getURL: jest.fn()});
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user