Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(test): don't leave so many zombies on sigint (#3130)

Joel Einbinder059004b17916
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() {