From cfd273e78f6b0dc4c5476fd8d2a52a9b56976329 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 00:16:04 +0000 Subject: [PATCH] Cover idempotent runtime server shutdown in integration tests 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 e4f7fecae6..143cdf9a8c 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -121,6 +121,16 @@ afterEach(async () => { }); describe("runtimeApiServer", () => { + it("allows runtime server close to be called multiple times", async () => { + const server = await startRuntimeApiServer({ + port: 0, + launchCwd: process.cwd(), + }); + + await expect(server.close()).resolves.toBeUndefined(); + await expect(server.close()).resolves.toBeUndefined(); + }); + it("rejects empty auth token configuration", async () => { await expect( startRuntimeApiServer({