Skip to content

Commit

Permalink
fix: skip closing external browser on teardown
Browse files Browse the repository at this point in the history
Skip closing a long-running or externally connected to browser in teardown phase.
  • Loading branch information
donovan-graham authored and gregberge committed Dec 6, 2018
1 parent 98cf634 commit 0505b2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/jest-environment-puppeteer/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export async function setup() {
}

export async function teardown() {
const config = await readConfig()
await teardownServer()
await browser.close()
if (!config.connect) {
await browser.close()
}
}

0 comments on commit 0505b2c

Please sign in to comment.