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

Function testTapAsyncErrorPropagation

test/parallel/test-stream-iter-consumers-tap.js:85–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84// Tap callback error propagates through async pipeline
85async function testTapAsyncErrorPropagation() {
86 const badTap = tap(() => { throw new Error('tap error'); });
87 await assert.rejects(async () => {
88 // eslint-disable-next-line no-unused-vars
89 for await (const _ of pull(from('hello'), badTap)) { /* consume */ }
90 }, { message: 'tap error' });
91}
92
93// TapSync callback error propagates through sync pipeline
94function testTapSyncErrorPropagation() {

Calls 3

tapFunction · 0.85
pullFunction · 0.70
fromFunction · 0.50

Tested by

no test coverage detected