MCPcopy Create free account
hub / github.com/banga/git-split-diffs / drain

Function drain

src/zip.test.ts:34–40  ·  view source on GitHub ↗
(i: AsyncIterable<T>)

Source from the content-addressed store, hash-verified

32
33describe('zipAsync', () => {
34 async function drain<T>(i: AsyncIterable<T>): Promise<Array<T>> {
35 const values = [];
36 for await (const value of i) {
37 values.push(value);
38 }
39 return values;
40 }
41
42 test('empty', async () => {
43 expect(await drain(zipAsync())).toEqual([]);

Callers 1

zip.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected