import { rewiremock } from './rewiremock'; import WebContents = Electron.WebContents; const electronMock: DeepPartial = { app: { on() {}, }, BrowserWindow: class { public webContents: DeepPartial = { openDevTools() {}, }; public loadFile() {} public on() {} }, ipcMain: { on() {}, }, }; rewiremock('electron').with(electronMock);