( client: OrpcTestClient, workspaceId: string, timeoutMs: number = 30000 )
| 565 | * Common pattern: create collector, wait for end, assert success. |
| 566 | */ |
| 567 | export 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. |
nothing calls this directly
no test coverage detected