Cover null launchCwd startup rejection

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:38:23 +00:00
1 parent d90ec00087
commit fb6a083b5b
1 file changed
+9
+9
View File
@@ -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");