MCPcopy Create free account
hub / github.com/github/copilot-sdk / waitForExchanges

Function waitForExchanges

nodejs/test/e2e/multi_provider_registry.e2e.test.ts:27–37  ·  view source on GitHub ↗
(minimumCount = 1)

Source from the content-addressed store, hash-verified

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 ?? {};

Callers 1

assertRoutingFunction · 0.70

Calls 2

retryFunction · 0.90
getExchangesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…