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

Function testPullSyncSourceError

test/parallel/test-stream-iter-pull-sync.js:62–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61// PullSync source error propagates
62function testPullSyncSourceError() {
63 function* failingSource() {
64 yield [new TextEncoder().encode('a')];
65 throw new Error('sync source boom');
66 }
67 assert.throws(() => {
68 // eslint-disable-next-line no-unused-vars
69 for (const _ of pullSync(failingSource())) { /* consume */ }
70 }, { message: 'sync source boom' });
71}
72
73// PullSync with empty source
74function testPullSyncEmptySource() {

Callers 1

Calls 2

pullSyncFunction · 0.85
failingSourceFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…