Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
test(cli): align timeout failure with result contract
James00b88abeb7d4
diff --git a/packages/cli/src/commands/transcribe.test.ts b/packages/cli/src/commands/transcribe.test.tsindex 293dc576ff..621210c900 100644--- a/packages/cli/src/commands/transcribe.test.ts+++ b/packages/cli/src/commands/transcribe.test.ts@@ -3,7 +3,7 @@ import { writeFileSync, readFileSync, mkdtempSync, rmSync } from "node:fs";import { join } from "node:path";import { tmpdir } from "node:os";import { WhisperUnavailableError } from "../whisper/manager.js";-import { consumeCommandResult } from "../utils/commandResult.js";+import { CliRuntimeError, consumeCommandResult } from "../utils/commandResult.js";// Make the whisper core report "unavailable" so we exercise the soft-skip path.const transcribeMock = vi.fn();@@ -101,16 +101,13 @@ Render video. Built for agents.const { dir, input } = dummyAudio();dirs.push(dir);const consoleLog = vi.mocked(console.log);- const exitSpy = vi.spyOn(process, "exit").mockImplementation(((code?: number) => {- throw new Error(`__exit_${code}__`);- }) as never);// 100 is well below the 5000ms minimum — must fail loud instead of silently// reverting to the auto-scaled default (the whole point of the flag is// that the user explicitly asked for a specific value).await expect(transcribeCmd.run!({ args: { input, json: true, timeout: "100" } } as never),- ).rejects.toThrow("__exit_1__");+ ).rejects.toThrow(CliRuntimeError);const log = consoleLog.mock.calls.at(-1)?.[0];expect(typeof log).toBe("string");@@ -119,8 +116,6 @@ Render video. Built for agents.expect(parsed.ok).toBe(false);expect(parsed.error).toContain("--timeout");expect(parsed.error).toContain("5000");-- exitSpy.mockRestore();});it("--preserve-cues keeps single-word cues separate when exporting from JSON", async () => {