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

Function testPullWithSyncSource

test/parallel/test-stream-iter-pull-async.js:299–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298// Pull with a sync iterable source (not async)
299async function testPullWithSyncSource() {
300 function* gen() {
301 yield new TextEncoder().encode('sync-source');
302 }
303 const data = await text(pull(gen()));
304 assert.strictEqual(data, 'sync-source');
305}
306
307// Pull transform yielding strings
308async function testPullTransformYieldsStrings() {

Callers 1

Calls 3

pullFunction · 0.70
genFunction · 0.70
textFunction · 0.50

Tested by

no test coverage detected