diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index e46822c2f4..f4cc245782 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -272,6 +272,12 @@ describe("parseCliOptions", () => { ); }); + it("treats end-of-options marker after --backend-port as missing value", () => { + expect(() => parseCliOptions(["--backend-port", "--"], {}, "/workspace")).toThrow( + "Missing value for --backend-port", + ); + }); + it("throws when web port value is missing", () => { expect(() => parseCliOptions(["--web-port"], {}, "/workspace")).toThrow( "Missing value for --web-port", @@ -290,6 +296,12 @@ describe("parseCliOptions", () => { ); }); + it("treats end-of-options marker after --web-port as missing value", () => { + expect(() => parseCliOptions(["--web-port", "--"], {}, "/workspace")).toThrow( + "Missing value for --web-port", + ); + }); + it("throws for invalid environment port values", () => { expect(() => parseCliOptions([], { T3_WEB_PORT: "nope" }, "/workspace")).toThrow( "Invalid value for T3_WEB_PORT", @@ -383,6 +395,12 @@ describe("parseCliOptions", () => { ); }); + it("treats end-of-options marker after --cwd as missing value", () => { + expect(() => parseCliOptions(["--cwd", "--"], {}, "/workspace")).toThrow( + "Missing value for --cwd", + ); + }); + it("throws for unknown arguments", () => { expect(() => parseCliOptions(["--wat"], {}, "/workspace")).toThrow( "Unknown argument: --wat",