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

Function testTapSyncErrorPropagation

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

Source from the content-addressed store, hash-verified

92
93// TapSync callback error propagates through sync pipeline
94function testTapSyncErrorPropagation() {
95 const badTap = tapSync(() => { throw new Error('tapSync error'); });
96 assert.throws(() => {
97 // eslint-disable-next-line no-unused-vars
98 for (const _ of pullSync(fromSync('hello'), badTap)) { /* consume */ }
99 }, { message: 'tapSync error' });
100}
101
102// TapSync in a pullSync pipeline passes through data and flush
103function testTapSyncInPipeline() {

Calls 3

tapSyncFunction · 0.85
pullSyncFunction · 0.85
fromSyncFunction · 0.50

Tested by

no test coverage detected