fix(test): don't leave so many zombies on sigint (#3130)
This commit is contained in:
parent
74941340be
commit
059004b179
|
|
@ -51,6 +51,12 @@ class PlaywrightEnvironment extends NodeEnvironment {
|
||||||
this.fixturePool.registerFixture(name, 'worker', fn);
|
this.fixturePool.registerFixture(name, 'worker', fn);
|
||||||
};
|
};
|
||||||
registerFixtures(this.global);
|
registerFixtures(this.global);
|
||||||
|
|
||||||
|
process.on('SIGINT', async () => {
|
||||||
|
await this.fixturePool.teardownScope('test');
|
||||||
|
await this.fixturePool.teardownScope('worker');
|
||||||
|
process.exit(130);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async setup() {
|
async setup() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue