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

Function testEmptySync

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

Source from the content-addressed store, hash-verified

477// =============================================================================
478
479function testEmptySync() {
480 function* gen() {
481 // yields nothing
482 }
483
484 const readable = toReadableSync(gen());
485 const result = readable.read();
486 assert.strictEqual(result, null);
487}
488
489// =============================================================================
490// fromStreamIterSync: destroy calls iterator.return()

Callers 1

Calls 3

toReadableSyncFunction · 0.85
genFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected