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

Function testBasicShare

test/parallel/test-stream-iter-share-async.js:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16// =============================================================================
17
18async function testBasicShare() {
19 const shared = share(from('hello shared'));
20
21 const consumer = shared.pull();
22 const data = await text(consumer);
23 assert.strictEqual(data, 'hello shared');
24}
25
26async function testShareMultipleConsumers() {
27 async function* gen() {

Callers 1

Calls 4

shareFunction · 0.85
fromFunction · 0.50
textFunction · 0.50
pullMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…