From 656e60216dfe2ec292850e7554c218d259d7b97b 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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/electron/test/index.js b/test/electron/test/index.js index 36d1888ef..f990ba5fa 100644 --- a/test/electron/test/index.js +++ b/test/electron/test/index.js @@ -30,10 +30,14 @@ 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); + } } }