(peer: FakePeer)
| 86 | } |
| 87 | |
| 88 | async function expectInitialize(peer: FakePeer): Promise<void> { |
| 89 | const initialize = (await peer.next('initialize')) as { |
| 90 | method?: string |
| 91 | id?: unknown |
| 92 | params?: { clientInfo?: { name?: string; version?: string } } |
| 93 | } |
| 94 | expect(initialize.method).toBe('initialize') |
| 95 | expect(initialize.id).toBe('initialize') |
| 96 | expect(initialize.params?.clientInfo?.name).toBe('ncode-test') |
| 97 | peer.send({ |
| 98 | id: initialize.id, |
| 99 | result: { |
| 100 | userAgent: 'codex-test', |
| 101 | codexHome: '/tmp/codex', |
| 102 | platformFamily: 'unix', |
| 103 | platformOs: 'linux', |
| 104 | }, |
| 105 | }) |
| 106 | const initialized = (await peer.next('initialized')) as { method?: string } |
| 107 | expect(initialized.method).toBe('initialized') |
| 108 | } |
| 109 | |
| 110 | function testConnectArgs(url: string) { |
| 111 | return { |
no test coverage detected