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

Function testEmptyAsync

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

Source from the content-addressed store, hash-verified

110// =============================================================================
111
112async function testEmptyAsync() {
113 async function* gen() {
114 // yields nothing
115 }
116
117 const readable = toReadable(gen());
118 const result = await collect(readable);
119 assert.strictEqual(result.length, 0);
120}
121
122// =============================================================================
123// fromStreamIter: empty batches are skipped

Callers 1

Calls 3

toReadableFunction · 0.85
genFunction · 0.70
collectFunction · 0.70

Tested by

no test coverage detected