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 656e602
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/electron/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 656e602

Please sign in to comment.