Skip to content

Commit 4da9c4f

Browse files
committed
teardownServer if watch or watchAll does not passed
1 parent 11f9f7f commit 4da9c4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PlaywrightEnvironment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ class PlaywrightEnvironment extends NodeEnvironment {
155155
}
156156
}
157157

158-
async teardown() {
158+
async teardown(jestConfig = {}) {
159159
await super.teardown()
160-
if (teardownServer) {
160+
if (!jestConfig.watch && !jestConfig.watchAll && teardownServer) {
161161
await teardownServer()
162162
}
163163
if (this.global.page) {

0 commit comments

Comments
 (0)