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

Function testSyncShareDispose

test/parallel/test-stream-iter-share-coverage.js:58–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57// Sync share — Symbol.dispose cancels
58async function testSyncShareDispose() {
59 const shared = shareSync(fromSync('sync-dispose'));
60 const consumer = shared.pull();
61 shared[Symbol.dispose]();
62 assert.strictEqual(shared.consumerCount, 0);
63 const result = textSync(consumer);
64 assert.strictEqual(result, '');
65}
66
67// Async consumer iterator throw()
68async function testAsyncIteratorThrow() {

Calls 4

shareSyncFunction · 0.85
textSyncFunction · 0.85
fromSyncFunction · 0.50
pullMethod · 0.45

Tested by

no test coverage detected