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

This commit is contained in:
Joel Einbinder 2020-07-23 16:47:43 -07:00 committed by GitHub
parent 74941340be
commit 059004b179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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