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

Function testShareProtocolHappyPath

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

Source from the content-addressed store, hash-verified

21
22// Share.from — protocol symbol happy path (returns valid share object)
23async function testShareProtocolHappyPath() {
24 const obj = {
25 [shareProtocol](options) {
26 return share(from('protocol-data'), options);
27 },
28 };
29 const shared = Share.from(obj);
30 const result = await text(shared.pull());
31 assert.strictEqual(result, 'protocol-data');
32}
33
34// SyncShare.fromSync — protocol symbol happy path
35async function testSyncShareProtocolHappyPath() {

Calls 3

textFunction · 0.50
fromMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected