MCPcopy Index your code
hub / github.com/nodejs/node / testArrayAsync

Function testArrayAsync

test/parallel/test-stream-iter-consumers-bytes.js:109–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107}
108
109async function testArrayAsync() {
110 async function* gen() {
111 yield [new Uint8Array([1])];
112 yield [new Uint8Array([2])];
113 }
114 const chunks = await array(gen());
115 assert.strictEqual(chunks.length, 2);
116 assert.deepStrictEqual(chunks[0], new Uint8Array([1]));
117 assert.deepStrictEqual(chunks[1], new Uint8Array([2]));
118}
119
120async function testArrayAsyncLimit() {
121 async function* gen() {

Calls 2

genFunction · 0.70
arrayFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…