(id: number)
| 221 | child.stdin.write(JSON.stringify({ jsonrpc: '2.0', id: 2, method: 'prompts/list', params: {} }) + '\n'); |
| 222 | |
| 223 | const replyFor = async (id: number) => { |
| 224 | const ev = await waitFor(events, (e) => { |
| 225 | if (e.stream !== 'stdout') return false; |
| 226 | try { return JSON.parse(e.text).id === id; } catch { return false; } |
| 227 | }, 5000); |
| 228 | return JSON.parse(ev.text); |
| 229 | }; |
| 230 | |
| 231 | const resources = await replyFor(1); |
| 232 | expect(resources.error).toBeUndefined(); |
no test coverage detected