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

Function testShareSyncBasic

test/parallel/test-stream-iter-share-sync.js:17–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15// =============================================================================
16
17async function testShareSyncBasic() {
18 const shared = shareSync(fromSync('sync shared'));
19
20 const consumer = shared.pull();
21 const data = textSync(consumer);
22 assert.strictEqual(data, 'sync shared');
23}
24
25async function testShareSyncMultipleConsumers() {
26 const enc = new TextEncoder();

Callers 1

Calls 4

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

Tested by

no test coverage detected