(minimumCount = 1)
| 25 | const { copilotClient: client, openAiEndpoint } = await createSdkTestContext(); |
| 26 | |
| 27 | async function waitForExchanges(minimumCount = 1): Promise<ParsedHttpExchange[]> { |
| 28 | await retry( |
| 29 | `capture ${minimumCount} chat completion request(s)`, |
| 30 | async () => { |
| 31 | const exchanges = await openAiEndpoint.getExchanges(); |
| 32 | expect(exchanges.length).toBeGreaterThanOrEqual(minimumCount); |
| 33 | }, |
| 34 | 1_200 |
| 35 | ); |
| 36 | return openAiEndpoint.getExchanges(); |
| 37 | } |
| 38 | |
| 39 | function getHeader(exchange: ParsedHttpExchange, name: string): string | undefined { |
| 40 | const headers = exchange.requestHeaders ?? {}; |
no test coverage detected
searching dependent graphs…