Cover trimmed positional cwd argument parsing
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
223f4063ec
commit
86fcc2a949
1 file changed
+5
@@ -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]");
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user