Skip to content

Commit

Permalink
Remove open shells as they get killed
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Sep 25, 2024
1 parent eb9ceb9 commit 0c99e61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/e2e-tests/test/test-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ export class TestShell {
}

static async killAll(): Promise<void> {
// Using splice to mutate the array of open shells in-place
const openShells = TestShell._openShells.splice(0);
await Promise.all(
TestShell._openShells.map((shell) => {
openShells.map((shell) => {
shell.kill();
return shell.waitForExit();
})
Expand Down

0 comments on commit 0c99e61

Please sign in to comment.