From ff8341761ce607e4bb02c2cf1801242dd3e191d8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 11:39:16 +0000 Subject: [PATCH] Use websocket length constants in runtime malformed-request tests Co-authored-by: Theo Browne --- apps/t3/src/runtimeApiServer.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/t3/src/runtimeApiServer.test.ts b/apps/t3/src/runtimeApiServer.test.ts index 661611d01d..5d7ff8056b 100644 --- a/apps/t3/src/runtimeApiServer.test.ts +++ b/apps/t3/src/runtimeApiServer.test.ts @@ -6,6 +6,8 @@ import { afterEach, describe, expect, it } from "vitest"; import { WebSocket } from "ws"; import { + WS_METHOD_MAX_CHARS, + WS_REQUEST_ID_MAX_CHARS, WS_CLOSE_CODES, WS_CLOSE_REASONS, WS_EVENT_CHANNELS, @@ -759,7 +761,7 @@ describe("runtimeApiServer", () => { client.socket.send( JSON.stringify({ type: "request", - id: "x".repeat(300), + id: "x".repeat(WS_REQUEST_ID_MAX_CHARS + 1), method: "todos.list", }), ); @@ -767,7 +769,7 @@ describe("runtimeApiServer", () => { JSON.stringify({ type: "request", id: "malformed-long-method", - method: "m".repeat(300), + method: "m".repeat(WS_METHOD_MAX_CHARS + 1), }), );