diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index e89d87d8c8..b08a5e740b 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -465,6 +465,12 @@ describe("parseCliOptions", () => { ); }); + it("throws for zero backend explicit port values", () => { + expect(() => parseCliOptions(["--backend-port", "0"], {}, "/workspace")).toThrow( + "Invalid value for --backend-port", + ); + }); + it("throws for empty equals-style backend port values", () => { expect(() => parseCliOptions(["--backend-port="], {}, "/workspace")).toThrow( "Invalid value for --backend-port", @@ -543,6 +549,12 @@ describe("parseCliOptions", () => { ); }); + it("rejects zero web port values provided as separate args", () => { + expect(() => parseCliOptions(["--web-port", "0"], {}, "/workspace")).toThrow( + "Invalid value for --web-port", + ); + }); + it("treats known flags after --web-port as missing values", () => { expect(() => parseCliOptions(["--web-port", "--cwd"], {}, "/workspace")).toThrow( "Missing value for --web-port",