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

Function testMergeWithAbortSignal

test/parallel/test-stream-iter-consumers-merge.js:57–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57async function testMergeWithAbortSignal() {
58 const merged = merge(from('data'), { signal: AbortSignal.abort() });
59
60 await assert.rejects(
61 async () => {
62 // eslint-disable-next-line no-unused-vars
63 for await (const _ of merged) {
64 assert.fail('Should not reach here');
65 }
66 },
67 { name: 'AbortError' },
68 );
69}
70
71// Regression test: merge() with sync iterable sources
72async function testMergeSyncSources() {

Calls 4

abortMethod · 0.65
mergeFunction · 0.50
fromFunction · 0.50
failMethod · 0.45

Tested by

no test coverage detected