( stream: AsyncIterable<StreamChunk>, )
| 9 | |
| 10 | // Helper to collect all chunks from an async iterable |
| 11 | async function collectChunks( |
| 12 | stream: AsyncIterable<StreamChunk>, |
| 13 | ): Promise<Array<StreamChunk>> { |
| 14 | const chunks: Array<StreamChunk> = [] |
| 15 | for await (const chunk of stream) { |
| 16 | chunks.push(chunk) |
| 17 | } |
| 18 | return chunks |
| 19 | } |
| 20 | |
| 21 | // ============================================================================ |
| 22 | // generateImage({ stream: true }) tests |
no test coverage detected