Skip to content

Commit

Permalink
fix: start/stop devServer on watch mode (fixes argos-ci#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta authored Nov 28, 2019
1 parent 1aafdef commit 10bc60e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/jest-environment-puppeteer/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export async function setup(jestConfig = {}) {
}
process.env.PUPPETEER_WS_ENDPOINT = browser.wsEndpoint()

if (jestConfig.watch || jestConfig.watchAll) return

if (config.server) {
try {
await setupServer(config.server)
Expand Down Expand Up @@ -60,7 +58,5 @@ export async function teardown(jestConfig = {}) {
await browser.close()
}

if (!jestConfig.watch && !jestConfig.watchAll) {
await teardownServer()
}
await teardownServer()
}

0 comments on commit 10bc60e

Please sign in to comment.