From fb6a083b5b496c3c53980dc5b06d59f205237cbe Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:38:23 +0000 Subject: [PATCH] Cover null launchCwd startup rejection Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index 821d3dd2ac..230f9abdec 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -293,6 +293,15 @@ describe("runtimeApiServer", () => { ).rejects.toThrow("Invalid launchCwd must be a non-empty path"); }); + it("rejects startup when launchCwd is null", async () => { + await expect( + startRuntimeApiServer({ + port: 0, + launchCwd: null as unknown as string, + }), + ).rejects.toThrow("Invalid launchCwd must be a non-empty path"); + }); + it("rejects startup when launchCwd is not a directory", async () => { const tempDir = mkdtempSync(path.join(os.tmpdir(), "t3-launch-cwd-file-")); const filePath = path.join(tempDir, "launch.txt");