Cover zero environment backend and web port rejection

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:48:13 +00:00
1 parent c557259673
commit de10ddea16
1 file changed
+12
+12
View File
@@ -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",