import WebContents = Electron.WebContents; import path from 'path'; import { rewiremock } from './rewiremock'; const electronMock: DeepPartial = { app: { on(): void {}, getPath(name: string): string { return path.resolve('test-paths', name); }, quit(): void {}, }, BrowserWindow: class { public webContents: DeepPartial = { openDevTools(): void {}, }; public loadFile(): void {} public on(): void {} }, ipcMain: { on(): void {}, }, }; rewiremock('electron').with(electronMock);