From 75f4896abbc3def76731c3da05587c4974fc542f Mon Sep 17 00:00:00 2001 From: "K.J. Valencik" Date: Mon, 30 Aug 2021 15:15:59 -0400 Subject: [PATCH] fix(electron-test): Don't fail the test if the chrome driver fails to shutdown --- test/electron/test/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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(); + } } }