From 059004b17916e413c8fa2199d062f9def5967533 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Thu, 23 Jul 2020 16:47:43 -0700 Subject: [PATCH] fix(test): don't leave so many zombies on sigint (#3130) --- test/jest/playwrightEnvironment.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/jest/playwrightEnvironment.js b/test/jest/playwrightEnvironment.js index 2c1bc84416..8f53ea698a 100644 --- a/test/jest/playwrightEnvironment.js +++ b/test/jest/playwrightEnvironment.js @@ -51,6 +51,12 @@ class PlaywrightEnvironment extends NodeEnvironment { this.fixturePool.registerFixture(name, 'worker', fn); }; registerFixtures(this.global); + + process.on('SIGINT', async () => { + await this.fixturePool.teardownScope('test'); + await this.fixturePool.teardownScope('worker'); + process.exit(130); + }); } async setup() {