From e1f6c86c750f51125bfbe46a627e472d8485c055 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 03:25:21 +0000 Subject: [PATCH] Cover NaN and infinite bootstrap timeout rejection Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.test.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index d9fb6bc3f4..511d19ff82 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -268,6 +268,26 @@ describe("runtimeApiServer", () => { ).rejects.toThrow("Invalid bootstrapSessionTimeoutMs"); }); + it("rejects NaN bootstrap timeout configuration", async () => { + await expect( + startRuntimeApiServer({ + port: 0, + launchCwd: process.cwd(), + bootstrapSessionTimeoutMs: Number.NaN, + }), + ).rejects.toThrow("Invalid bootstrapSessionTimeoutMs"); + }); + + it("rejects infinite bootstrap timeout configuration", async () => { + await expect( + startRuntimeApiServer({ + port: 0, + launchCwd: process.cwd(), + bootstrapSessionTimeoutMs: Number.POSITIVE_INFINITY, + }), + ).rejects.toThrow("Invalid bootstrapSessionTimeoutMs"); + }); + it("rejects overly large bootstrap timeout configuration", async () => { await expect( startRuntimeApiServer({