Skip to content

Commit

Permalink
Wrapped .close with a try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg authored and alexeyraspopov committed Aug 23, 2018
1 parent 3cf60c1 commit 129c376
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ class WebDriverEnvironment extends NodeEnvironment {

async teardown() {
if (this.driver) {
await this.driver.close();
// https://github.com/alexeyraspopov/jest-webdriver/issues/8
try {
await this.driver.close();
} catch (error) { }

// https://github.com/mozilla/geckodriver/issues/1151
try {
Expand Down

0 comments on commit 129c376

Please sign in to comment.