Skip to content

Commit

Permalink
fix(electron-test): Don't fail the test if the chrome driver fails to…
Browse files Browse the repository at this point in the history
… shutdown
  • Loading branch information
kjvalencik committed Aug 30, 2021
1 parent 7958f51 commit 75f4896
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/electron/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

Expand Down

0 comments on commit 75f4896

Please sign in to comment.