Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests #1553

Merged
merged 4 commits into from
Nov 19, 2020
Merged

Tests #1553

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions __mocks__/electron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const electron = {
app: {
on: jest.fn(),
getPath: jest.fn(),
getVersion: jest.fn()
},
BrowserWindow: jest.fn(),
ipcMain: {
on: jest.fn(),
handle: jest.fn()
},
shell: jest.fn(),
Menu: jest.fn()
};

module.exports = electron;
19 changes: 19 additions & 0 deletions __mocks__/winston.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const logger = {
addColors: jest.fn(),
format: {
combine: jest.fn(),
colorize: jest.fn(),
simple: jest.fn(),
json: jest.fn()
},
transports: {
Console: jest.fn(),
File: jest.fn()
},
createLogger: jest.fn().mockImplementation(() => ({
query: jest.fn(),
log: jest.fn()
}))
};

module.exports = logger;
Loading