diff --git a/package.json b/package.json index aeff506f..5d4d3295 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "start": "run-s compile browserify && cross-env ELECTRON_DEV=true electron .", "test": "run-s lint test:unit", "test:unit": "cross-env ELECTRON_QA=true jest --config jest-config.json --runInBand --detectOpenHandles", - "test:spectron": "npm run copy && run-s lint compile browserify && npx ava --verbose --serial", + "test:spectron": "npm run copy && run-s lint compile browserify && cross-env ELECTRON_QA=true npx ava --verbose --serial", "copy": "run-os", "copy:darwin": "ncp config 'node_modules/electron/dist/Electron.app/Contents/config'", "copy:win32": "ncp config node_modules\\electron\\dist\\config", diff --git a/src/app/main.ts b/src/app/main.ts index f405a520..d4f0ff71 100644 --- a/src/app/main.ts +++ b/src/app/main.ts @@ -2,7 +2,7 @@ import { app } from 'electron'; import * as electronDownloader from 'electron-dl'; import * as shellPath from 'shell-path'; -import { isDevEnv, isLinux, isMac } from '../common/env'; +import { isDevEnv, isElectronQA, isLinux, isMac } from '../common/env'; import { logger } from '../common/logger'; import { getCommandLineArgs } from '../common/utils'; import { cleanUpAppCache, createAppCacheFile } from './app-cache-handler'; @@ -51,7 +51,9 @@ setChromeFlags(); // Need this to prevent blank pop-out from 8.x versions // Refer - SDA-1877 - https://github.com/electron/electron/issues/18397 -app.allowRendererProcessReuse = true; +if (!isElectronQA) { + app.allowRendererProcessReuse = true; +} // Electron sets the default protocol if (!isDevEnv) {