Expand short -o equals-value parser coverage
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
a80816d86c
commit
e92d432cae
1 file changed
+9
@@ -106,6 +106,11 @@ describe("parseCliOptions", () => {
|
||||
expect(disabled.noOpen).toBe(true);
|
||||
});
|
||||
|
||||
it("supports equals-style -o off values", () => {
|
||||
const options = parseCliOptions(["-o=off"], { T3_NO_OPEN: "true" }, "/workspace");
|
||||
expect(options.noOpen).toBe(true);
|
||||
});
|
||||
|
||||
it("lets -o=true override truthy no-open environment defaults", () => {
|
||||
const options = parseCliOptions(["-o=true"], { T3_NO_OPEN: "yes" }, "/workspace");
|
||||
expect(options.noOpen).toBe(false);
|
||||
@@ -187,6 +192,10 @@ describe("parseCliOptions", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("throws for empty equals-style -o values", () => {
|
||||
expect(() => parseCliOptions(["-o="], {}, "/workspace")).toThrow("Invalid value for -o");
|
||||
});
|
||||
|
||||
it("throws for empty equals-style --open values", () => {
|
||||
expect(() => parseCliOptions(["--open="], {}, "/workspace")).toThrow(
|
||||
"Invalid value for --open",
|
||||
|
||||
Reference in new issue
Block a user