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