Cover trimmed positional cwd argument parsing

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 00:21:26 +00:00
1 parent 223f4063ec
commit 86fcc2a949
1 file changed
+5
+5
View File
@@ -118,6 +118,11 @@ describe("parseCliOptions", () => {
expect(options.launchCwd).toBe(path.resolve("apps/renderer"));
});
it("trims positional cwd arguments before resolving path", () => {
const options = parseCliOptions([" apps/renderer "], {}, "/workspace");
expect(options.launchCwd).toBe(path.resolve("apps/renderer"));
});
it("rejects whitespace-only positional cwd arguments", () => {
expect(() => parseCliOptions([" "], {}, "/workspace")).toThrow("Invalid value for [path]");
});