diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index b08a5e740b..21dc648600 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -627,12 +627,24 @@ describe("parseCliOptions", () => { ); }); + it("throws for zero web environment port values", () => { + expect(() => parseCliOptions([], { T3_WEB_PORT: "0" }, "/workspace")).toThrow( + "Invalid value for T3_WEB_PORT", + ); + }); + it("throws for out-of-range backend environment port values", () => { expect(() => parseCliOptions([], { T3_BACKEND_PORT: "65536" }, "/workspace")).toThrow( "Invalid value for T3_BACKEND_PORT", ); }); + it("throws for zero backend environment port values", () => { + expect(() => parseCliOptions([], { T3_BACKEND_PORT: "0" }, "/workspace")).toThrow( + "Invalid value for T3_BACKEND_PORT", + ); + }); + it("throws for whitespace-only backend environment port values", () => { expect(() => parseCliOptions([], { T3_BACKEND_PORT: " " }, "/workspace")).toThrow( "Invalid value for T3_BACKEND_PORT",