Skip to content

Commit

Permalink
Close browser in teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed Feb 14, 2020
1 parent b7dac86 commit cfa7637
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PlaywrightEnvironment.js
Expand Up @@ -127,6 +127,9 @@ class PlaywrightEnvironment extends NodeEnvironment {

async teardown() {
await super.teardown()
if (this.global.browser) {
await this.global.browser.close()
}
if (this.global.page) {
this.global.page.removeListener('pageerror', handleError)
await this.global.page.close()
Expand Down

0 comments on commit cfa7637

Please sign in to comment.