workaround for dev_console test using getWindowCount

This commit is contained in:
Karsten Hassel 2021-06-18 21:39:55 +02:00
parent 3418c9b50f
commit cfc0bcd5ad
3 changed files with 23 additions and 19 deletions

View file

@ -63,6 +63,11 @@ function createWindow() {
// Open the DevTools if run with "npm start dev"
if (process.argv.includes("dev")) {
if (process.env.JEST_WORKER_ID !== undefined) {
// if we are running with jest
var devtools = new BrowserWindow(electronOptions);
mainWindow.webContents.setDevToolsWebContents(devtools.webContents);
}
mainWindow.webContents.openDevTools();
}