(id: number)
| 165 | child.stdin.write(JSON.stringify({ jsonrpc: '2.0', id: 2, method: 'prompts/list', params: {} }) + '\n'); |
| 166 | |
| 167 | const replyFor = async (id: number) => { |
| 168 | const ev = await waitFor(events, (e) => { |
| 169 | if (e.stream !== 'stdout') return false; |
| 170 | try { return JSON.parse(e.text).id === id; } catch { return false; } |
| 171 | }, 5000); |
| 172 | return JSON.parse(ev.text); |
| 173 | }; |
| 174 | |
| 175 | const resources = await replyFor(1); |
| 176 | expect(resources.error).toBeUndefined(); |
no test coverage detected