Cover equals-style dash-prefixed cwd parsing
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
271d78a9a5
commit
ea69ec16fe
1 file changed
+5
@@ -313,6 +313,11 @@ describe("parseCliOptions", () => {
|
||||
expect(options.launchCwd).toBe(path.resolve("/workspace", "-project"));
|
||||
});
|
||||
|
||||
it("accepts dash-prefixed cwd values with equals-style --cwd argument", () => {
|
||||
const options = parseCliOptions(["--cwd=-project"], {}, "/workspace");
|
||||
expect(options.launchCwd).toBe(path.resolve("/workspace", "-project"));
|
||||
});
|
||||
|
||||
it("treats known flags after --cwd as missing values", () => {
|
||||
expect(() => parseCliOptions(["--cwd", "--help"], {}, "/workspace")).toThrow(
|
||||
"Missing value for --cwd",
|
||||
|
||||
Reference in new issue
Block a user