(id: number)
| 514 | close = c; |
| 515 | const local = `http://127.0.0.1:${port}/mcp`; |
| 516 | const post = async (id: number) => { |
| 517 | const res = await fetch(local, { |
| 518 | method: "POST", |
| 519 | headers: { |
| 520 | "Content-Type": "application/json", |
| 521 | Accept: "application/json, text/event-stream", |
| 522 | Authorization: "Bearer idle_token", |
| 523 | }, |
| 524 | body: JSON.stringify({ jsonrpc: "2.0", id, method: "tools/list" }), |
| 525 | }); |
| 526 | const text = await res.text(); |
| 527 | return { status: res.status, text }; |
| 528 | }; |
| 529 | |
| 530 | const first = await post(1); |
| 531 | expect(first.status).toBe(200); |
no test coverage detected