Skip to content

Write HTML. Render video. Built for agents.

test(cli): the Chrome orphan check waits for Chrome to exit instead of 5 s (#5986)

Miguel Ángel00d55a7f1dab
diff --git a/packages/cli/src/browser/chromeOrphans.process.test.ts b/packages/cli/src/browser/chromeOrphans.process.test.ts
index 0205346af7..161127244f 100644
--- a/packages/cli/src/browser/chromeOrphans.process.test.ts
+++ b/packages/cli/src/browser/chromeOrphans.process.test.ts
@@ -65,8 +65,7 @@ it("leaves no Chrome process behind when the CLI is killed mid busy-loop", async
await new Promise((resolve) => setTimeout(resolve, 3_000));
run.record();
run.child.kill("SIGKILL");
- await new Promise((resolve) => setTimeout(resolve, 5_000));
- expect(alive(run.seen.chrome)).toEqual([]);
+ await waitForTestCondition(() => alive(run.seen.chrome).length === 0, 30_000);
await waitForTestCondition(() => alive(run.seen.watchdog).length === 0, 30_000);
}, 90_000);