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

Function testPullSourceError

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

Source from the content-addressed store, hash-verified

117
118// Pull source error propagates to consumer
119async function testPullSourceError() {
120 async function* failingSource() {
121 yield [new TextEncoder().encode('a')];
122 throw new Error('source boom');
123 }
124 await assert.rejects(async () => {
125 // eslint-disable-next-line no-unused-vars
126 for await (const _ of pull(failingSource())) { /* consume */ }
127 }, { message: 'source boom' });
128}
129
130// Tap callback error propagates through pipeline
131async function testTapCallbackError() {

Callers 1

Calls 2

pullFunction · 0.70
failingSourceFunction · 0.70

Tested by

no test coverage detected