From 8179ade04193405f4260ab3457364aaf3380bafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Tue, 8 Oct 2024 20:03:02 +0200 Subject: [PATCH] simplify TestShell#_onClose creation In an attempt to fix flakiness of "fails fast for ENOTFOUND/EINVAL errors" in e2e.spec.ts --- packages/e2e-tests/test/test-shell.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/e2e-tests/test/test-shell.ts b/packages/e2e-tests/test/test-shell.ts index 589f1defe..21ad1dce8 100644 --- a/packages/e2e-tests/test/test-shell.ts +++ b/packages/e2e-tests/test/test-shell.ts @@ -165,10 +165,7 @@ export class TestShell { }); } - this._onClose = (async () => { - const [code] = await once(shellProcess, 'close'); - return code; - })(); + this._onClose = once(shellProcess, 'close').then(([code]) => code); } get output(): string {