From 7a515bc5e4766ade936e9c146718ec49bff6481c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 00:02:38 +0000 Subject: [PATCH] Cover providers.listSessions success path in runtime tests Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index a739ba3bc3..8e9948e8dc 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -247,6 +247,31 @@ describe("runtimeApiServer", () => { client.socket.close(); }); + it("responds to providers.listSessions over websocket RPC", async () => { + const server = await startRuntimeApiServer({ + port: 0, + launchCwd: process.cwd(), + }); + servers.push(server); + + const client = await connectClient(server.wsUrl); + await client.nextMessage(); + + const response = await sendRequest( + client.socket, + client.nextMessage, + "providers-list-1", + "providers.listSessions", + ); + expect(response.ok).toBe(true); + if (!response.ok) { + throw new Error("Expected providers.listSessions response to succeed."); + } + expect(Array.isArray(response.result)).toBe(true); + + client.socket.close(); + }); + it("ignores malformed client messages and continues processing", async () => { const server = await startRuntimeApiServer({ port: 0,