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

Function testPipeToSyncEndSyncFallback

test/parallel/test-stream-iter-pipeto-edge.js:11–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10// pipeToSync endSync returns negative → falls back to end()
11async function testPipeToSyncEndSyncFallback() {
12 let endCalled = false;
13 const writer = {
14 writeSync() { return true; },
15 endSync() { return -1; }, // Negative → triggers end() fallback
16 end() { endCalled = true; },
17 };
18 pipeToSync(fromSync('data'), writer);
19 assert.strictEqual(endCalled, true);
20}
21
22// pipeToSync endSync missing → falls back to end()
23async function testPipeToSyncNoEndSync() {

Callers 1

Calls 2

pipeToSyncFunction · 0.85
fromSyncFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…