diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 09b43d5e65..f736301b7f 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -230,6 +230,12 @@ describe("parseCliOptions", () => { ); }); + it("rejects plus-prefixed explicit port values", () => { + expect(() => parseCliOptions(["--web-port", "+4318"], {}, "/workspace")).toThrow( + "Invalid value for --web-port", + ); + }); + it("throws for out-of-range explicit port values", () => { expect(() => parseCliOptions(["--backend-port", "65536"], {}, "/workspace")).toThrow( "Invalid value for --backend-port", @@ -296,6 +302,12 @@ describe("parseCliOptions", () => { ); }); + it("rejects plus-prefixed environment port values", () => { + expect(() => parseCliOptions([], { T3_BACKEND_PORT: "+4317" }, "/workspace")).toThrow( + "Invalid value for T3_BACKEND_PORT", + ); + }); + it("throws for empty environment port values", () => { expect(() => parseCliOptions([], { T3_WEB_PORT: "" }, "/workspace")).toThrow( "Invalid value for T3_WEB_PORT",