Use websocket length constants in runtime malformed-request tests

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 11:39:16 +00:00
1 parent 6ad9bda3c6
commit ff8341761c
1 file changed
+4 -2
+4 -2
View File
@@ -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),
}),
);