diff --git a/test/electron/test/index.js b/test/electron/test/index.js index 36d1888ef..3ec9db456 100644 --- a/test/electron/test/index.js +++ b/test/electron/test/index.js @@ -30,10 +30,15 @@ async function runTests() { console.log('Electron tests failed. :\'('); process.exitCode = -1; } finally { - // app.stop does not work with a secure window - // https://github.com/electron-userland/spectron/issues/347 - await app.client.executeAsync(() => window.close()); - await app.chromeDriver.stop(); + try { + // app.stop does not work with a secure window + // https://github.com/electron-userland/spectron/issues/347 + await app.client.executeAsync(() => window.close()); + await app.chromeDriver.stop(); + } catch (err) { + console.warn("Error stopping chrome driver", err); + process.exit(); + } } }