(mcpUrl: string, bearer: string, sessionId: string)
| 167 | } |
| 168 | |
| 169 | const openGet = async (mcpUrl: string, bearer: string, sessionId: string): Promise<SseCapture> => { |
| 170 | const abortController = new AbortController(); |
| 171 | const response = await fetch(mcpUrl, { |
| 172 | method: "GET", |
| 173 | headers: { |
| 174 | accept: "text/event-stream", |
| 175 | authorization: `Bearer ${bearer}`, |
| 176 | "mcp-protocol-version": PROTOCOL_VERSION, |
| 177 | "mcp-session-id": sessionId, |
| 178 | }, |
| 179 | signal: abortController.signal, |
| 180 | }); |
| 181 | expect(response.status, "GET SSE opens").toBe(200); |
| 182 | return new SseCapture(response, abortController); |
| 183 | }; |
| 184 | |
| 185 | const startPostCapture = async ( |
| 186 | mcpUrl: string, |
no test coverage detected