(chunks: Array<string>)
| 3 | import type { SandboxHandle, SpawnHandle } from '../src/contracts' |
| 4 | |
| 5 | async function* fromChunks(chunks: Array<string>): AsyncIterable<string> { |
| 6 | for (const c of chunks) { |
| 7 | // Yield asynchronously to mimic real stream scheduling. |
| 8 | await Promise.resolve() |
| 9 | yield c |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | async function collect<T>(it: AsyncIterable<T>): Promise<Array<T>> { |
| 14 | const out: Array<T> = [] |
no test coverage detected