Skip to content

Commit 059004b

Browse files
fix(test): don't leave so many zombies on sigint (#3130)
1 parent 7494134 commit 059004b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/jest/playwrightEnvironment.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ class PlaywrightEnvironment extends NodeEnvironment {
5151
this.fixturePool.registerFixture(name, 'worker', fn);
5252
};
5353
registerFixtures(this.global);
54+
55+
process.on('SIGINT', async () => {
56+
await this.fixturePool.teardownScope('test');
57+
await this.fixturePool.teardownScope('worker');
58+
process.exit(130);
59+
});
5460
}
5561

5662
async setup() {

0 commit comments

Comments
 (0)