( body: unknown, headers: Record<string, string> = MCP_POST_HEADERS, )
| 44 | }; |
| 45 | |
| 46 | const post = ( |
| 47 | body: unknown, |
| 48 | headers: Record<string, string> = MCP_POST_HEADERS, |
| 49 | ): Promise<Response> => |
| 50 | createMcpRequestHandler({ engine: stubEngine }).handleRequest( |
| 51 | new Request("http://local.test/mcp", { method: "POST", headers, body: JSON.stringify(body) }), |
| 52 | ); |
| 53 | |
| 54 | interface JsonRpcErrorBody { |
| 55 | readonly error: { readonly code: number; readonly message: string }; |
no test coverage detected