fix(FN-5930): remove duplicate const in afterEach cleanup

The FN-5930 squash merge combined two wait-for-exit strategies,
leaving a shadowed 'const exited' and double await. Collapse to
a single register-before-kill pattern.

Fusion-Task-Id: FN-5930
This commit is contained in:
gsxdsm
2026-06-02 21:42:38 -07:00
parent 3ac02ccdd3
commit a8f91e9cc8

View File

@@ -105,15 +105,13 @@ describe("reliability interactions: FN-5189 verification spawn supervision", ()
if (parent.exitCode === null && parent.signalCode === null) { if (parent.exitCode === null && parent.signalCode === null) {
// Register the exit listener BEFORE kill so we don't miss the // Register the exit listener BEFORE kill so we don't miss the
// event and deadlock. // event and deadlock.
const exited = once(parent, "exit").catch(() => {}); const exited = once(parent, "exit");
try { try {
const exited = once(parent, "exit");
parent.kill("SIGKILL"); parent.kill("SIGKILL");
await exited;
} catch { } catch {
// ignore cleanup failures // ignore cleanup failures
} }
await exited; await exited.catch(() => {});
} }
} }
spawnedParents.clear(); spawnedParents.clear();