From c5572596731fceeda0d362237a0c466e54c6f62e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:47:18 +0000 Subject: [PATCH] Cover zero explicit backend and web port rejection Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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",