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

Function testShareAlreadyAborted

test/parallel/test-stream-iter-share-async.js:199–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197}
198
199async function testShareAlreadyAborted() {
200 const shared = share(from('data'), { signal: AbortSignal.abort() });
201 const consumer = shared.pull();
202
203 await assert.rejects(async () => {
204 // eslint-disable-next-line no-unused-vars
205 for await (const _ of consumer) {
206 assert.fail('Should not reach here');
207 }
208 }, { name: 'AbortError' });
209}
210
211// =============================================================================
212// Source error propagation

Callers 1

Calls 5

shareFunction · 0.85
abortMethod · 0.65
fromFunction · 0.50
pullMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected