blowfish/tests/__mocks__/electron.js

29 lines
375 B
JavaScript

const electron = {
require: jest.fn(),
match: jest.fn(),
app: jest.fn(),
remote: jest.fn(),
shell: jest.fn(),
dialog: jest.fn()
}
const remote = {
getCurrentWindow: jest.fn()
}
const ipcRenderer = {
on: jest.fn()
}
// for the shell module above
const shell = {
openExternal: jest.fn()
}
module.exports = {
electron,
remote,
shell,
ipcRenderer
}