MCPcopy Create free account
hub / github.com/nodejs/node / gen

Function gen

test/parallel/test-stream-iter-to-readable.js:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46async function testMultiBatchAsync() {
47 async function* gen() {
48 for (let i = 0; i < 5; i++) {
49 const batch = [];
50 for (let j = 0; j < 3; j++) {
51 batch.push(Buffer.from(`${i}-${j} `));
52 }
53 yield batch;
54 }
55 }
56
57 const readable = toReadable(gen());
58 const result = await collect(readable);

Callers 15

testMultiBatchAsyncFunction · 0.70
testBackpressureAsyncFunction · 0.70
testErrorAsyncFunction · 0.70
testEmptyAsyncFunction · 0.70
testEmptyBatchAsyncFunction · 0.70
testDestroyAsyncFunction · 0.70
testLargeDataAsyncFunction · 0.70
testNotObjectModeFunction · 0.70
testSignalAsyncFunction · 0.70
testSignalAlreadyAbortedFunction · 0.70

Calls 4

allocMethod · 0.80
pushMethod · 0.45
fromMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected