Skip to content

Commit 6056e26

Browse files
committed
Shutdown testbeds after test
1 parent b531cc7 commit 6056e26

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/framework/Framework.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export class Framework {
8686
testee.describe(test, this.runs);
8787
});
8888
});
89+
90+
after('Shutdown testbed', async function () {
91+
await testee.shutdown();
92+
});
8993
});
9094
});
9195
}

src/framework/Testee.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export class Testee { // TODO unified with testbed interface
8686
});
8787
}
8888

89+
public async shutdown(): Promise<void> {
90+
return this.testbed?.kill();
91+
}
92+
8993
public describe(description: TestScenario, runs: number = 1) {
9094
const testee = this;
9195
const call: SuiteFunction | PendingSuiteFunction = description.skip ? describe.skip : this.suiteFunction;

0 commit comments

Comments
 (0)