21 lines
404 B
TypeScript
21 lines
404 B
TypeScript
|
import { rewiremock } from './rewiremock';
|
||
|
import WebContents = Electron.WebContents;
|
||
|
|
||
|
const electronMock: DeepPartial<typeof Electron> = {
|
||
|
app: {
|
||
|
on() {},
|
||
|
},
|
||
|
BrowserWindow: class {
|
||
|
public webContents: DeepPartial<WebContents> = {
|
||
|
openDevTools() {},
|
||
|
};
|
||
|
public loadFile() {}
|
||
|
public on() {}
|
||
|
},
|
||
|
ipcMain: {
|
||
|
on() {},
|
||
|
},
|
||
|
};
|
||
|
|
||
|
rewiremock('electron').with(electronMock);
|