From b520aa63f42ab7e671799390cea33eb3b0d61a33 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:35:06 +0000 Subject: [PATCH] Cover null runtime auth token startup rejection Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index fe2ef973ba..821d3dd2ac 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -403,6 +403,16 @@ describe("runtimeApiServer", () => { ).rejects.toThrow("Invalid runtime auth token"); }); + it("rejects null auth token configuration", async () => { + await expect( + startRuntimeApiServer({ + port: 0, + launchCwd: process.cwd(), + authToken: null as unknown as string, + }), + ).rejects.toThrow("Invalid runtime auth token"); + }); + it("accepts websocket connections without token when auth is disabled", async () => { const server = await startRuntimeApiServer({ port: 0,