MCPcopy
hub / github.com/coder/mux / waitForStreamSuccess

Function waitForStreamSuccess

tests/ipc/streamCollector.ts:567–577  ·  view source on GitHub ↗
(
  client: OrpcTestClient,
  workspaceId: string,
  timeoutMs: number = 30000
)

Source from the content-addressed store, hash-verified

565 * Common pattern: create collector, wait for end, assert success.
566 */
567export async function waitForStreamSuccess(
568 client: OrpcTestClient,
569 workspaceId: string,
570 timeoutMs: number = 30000
571): Promise<StreamCollector> {
572 const collector = createStreamCollector(client, workspaceId);
573 collector.start();
574 await collector.waitForEvent("stream-end", timeoutMs);
575 assertStreamSuccess(collector);
576 return collector;
577}
578
579/**
580 * Extract text content from stream events.

Callers

nothing calls this directly

Calls 4

createStreamCollectorFunction · 0.85
assertStreamSuccessFunction · 0.85
waitForEventMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected