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

Function testAlreadyAbortedSignal

test/parallel/test-stream-iter-broadcast-from.js:81–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81async function testAlreadyAbortedSignal() {
82 const { broadcast: bc } = broadcast({ signal: AbortSignal.abort() });
83 const consumer = bc.push();
84
85 await assert.rejects(async () => {
86 // eslint-disable-next-line no-unused-vars
87 for await (const _ of consumer) {
88 assert.fail('Should not reach here');
89 }
90 }, { name: 'AbortError' });
91}
92
93// =============================================================================
94// Broadcast.from() hang fix - cancel while write blocked on backpressure

Calls 4

abortMethod · 0.65
broadcastFunction · 0.50
pushMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…