diff --git a/packages/cli/src/__tests__/script-failure-guidance.test.ts b/packages/cli/src/__tests__/script-failure-guidance.test.ts index 34180ef9..00b1b651 100644 --- a/packages/cli/src/__tests__/script-failure-guidance.test.ts +++ b/packages/cli/src/__tests__/script-failure-guidance.test.ts @@ -401,8 +401,10 @@ describe("getSignalGuidance", () => { }); describe("buildRetryCommand", () => { - it("should return simple command without prompt", () => { + it("should return simple command when prompt is absent, undefined, or empty", () => { expect(buildRetryCommand("claude", "sprite")).toBe("spawn claude sprite"); + expect(buildRetryCommand("codex", "vultr", undefined)).toBe("spawn codex vultr"); + expect(buildRetryCommand("codex", "vultr", "")).toBe("spawn codex vultr"); }); it("should include --prompt when prompt is provided", () => { @@ -434,14 +436,6 @@ describe("buildRetryCommand", () => { expect(result).toBe('spawn claude sprite --prompt "Fix \\"all\\" bugs"'); }); - it("should return simple command when prompt is undefined", () => { - expect(buildRetryCommand("codex", "vultr", undefined)).toBe("spawn codex vultr"); - }); - - it("should return simple command when prompt is empty string", () => { - expect(buildRetryCommand("codex", "vultr", "")).toBe("spawn codex vultr"); - }); - // ── spawnName parameter (issue #1709) ──────────────────────────────────── it("should include --name flag when spawnName is provided without prompt", () => { diff --git a/packages/cli/src/__tests__/security.test.ts b/packages/cli/src/__tests__/security.test.ts index 0dc55ef7..d2da3442 100644 --- a/packages/cli/src/__tests__/security.test.ts +++ b/packages/cli/src/__tests__/security.test.ts @@ -610,8 +610,4 @@ describe("validatePrompt", () => { it("should accept semicolons not followed by rm", () => { expect(() => validatePrompt("echo hello; echo world")).not.toThrow(); }); - - it("should handle prompt with only whitespace", () => { - expect(() => validatePrompt(" \t\n ")).toThrow("Prompt is required but was not provided"); - }); });