Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

test: stop the follow observer check from hanging or passing blind

rponef5aeeeafd2c2
diff --git a/packages/cli/test/runtime-build-process.test.ts b/packages/cli/test/runtime-build-process.test.ts
index 5e7fc755..c6ff2fbe 100644
--- a/packages/cli/test/runtime-build-process.test.ts
+++ b/packages/cli/test/runtime-build-process.test.ts
@@ -175,12 +175,14 @@ test("CLI exits after durable submission and a restarted detached Worker complet
"--follow",
"--json",
], { cwd: project, stdio: "ignore" });
- await new Promise((resolve) => setTimeout(resolve, 500));
- assert.equal(follower.exitCode, null, "--follow is observing the still-queued Build");
+ let followerEnded = false;
const followerExit = new Promise<void>((resolve, reject) => {
- follower.once("exit", () => resolve());
- follower.once("error", reject);
+ follower.once("exit", () => { followerEnded = true; resolve(); });
+ follower.once("error", (error) => { followerEnded = true; reject(error); });
});
+ void followerExit.catch(() => {});
+ await new Promise((resolve) => setTimeout(resolve, 500));
+ assert.equal(followerEnded, false, "--follow is observing the still-queued Build");
follower.kill("SIGINT");
await followerExit;
const afterInterrupt = await cli(project, ["status", build, "--runtime", profile]);