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

Function testMergeSyncSources

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

Source from the content-addressed store, hash-verified

70
71// Regression test: merge() with sync iterable sources
72async function testMergeSyncSources() {
73 const s1 = fromSync('abc');
74 const s2 = fromSync('def');
75 const result = await text(merge(s1, s2));
76 // Both sources should be fully consumed; order may vary
77 assert.strictEqual(result.length, 6);
78 for (const ch of 'abcdef') {
79 assert.ok(result.includes(ch), `missing '${ch}' in '${result}'`);
80 }
81}
82
83// =============================================================================
84// Merge error propagation

Calls 5

includesMethod · 0.80
fromSyncFunction · 0.50
textFunction · 0.50
mergeFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected