Cover plus-prefixed port rejection cases

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:33:51 +00:00
1 parent 6cb05e1c0e
commit 282ff394dd
1 file changed
+12
+12
View File
@@ -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",