Cover --open token guards for port value parsing
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
2c885142b2
commit
ed3d0be205
1 file changed
+12
@@ -404,6 +404,12 @@ describe("parseCliOptions", () => {
|
||||
).toThrow("Missing value for --backend-port");
|
||||
});
|
||||
|
||||
it("treats --open equals-style tokens after --backend-port as missing values", () => {
|
||||
expect(() =>
|
||||
parseCliOptions(["--backend-port", "--open=false"], {}, "/workspace"),
|
||||
).toThrow("Missing value for --backend-port");
|
||||
});
|
||||
|
||||
it("treats end-of-options marker after --backend-port as missing value", () => {
|
||||
expect(() => parseCliOptions(["--backend-port", "--"], {}, "/workspace")).toThrow(
|
||||
"Missing value for --backend-port",
|
||||
@@ -434,6 +440,12 @@ describe("parseCliOptions", () => {
|
||||
).toThrow("Missing value for --web-port");
|
||||
});
|
||||
|
||||
it("treats --open equals-style tokens after --web-port as missing values", () => {
|
||||
expect(() => parseCliOptions(["--web-port", "--open=true"], {}, "/workspace")).toThrow(
|
||||
"Missing value for --web-port",
|
||||
);
|
||||
});
|
||||
|
||||
it("treats end-of-options marker after --web-port as missing value", () => {
|
||||
expect(() => parseCliOptions(["--web-port", "--"], {}, "/workspace")).toThrow(
|
||||
"Missing value for --web-port",
|
||||
|
||||
Reference in new issue
Block a user