MCPcopy
hub / github.com/sindresorhus/execa / testReadableDuplexDefault

Function testReadableDuplexDefault

test/convert/duplex.js:48–55  ·  view source on GitHub ↗
(t, fdNumber, from, options, hasResult)

Source from the content-addressed store, hash-verified

46
47// eslint-disable-next-line max-params
48const testReadableDuplexDefault = async (t, fdNumber, from, options, hasResult) => {
49 const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], options);
50 const stream = subprocess.duplex({from});
51 stream.end(foobarString);
52
53 await assertStreamOutput(t, stream, hasResult ? foobarString : '');
54 await assertSubprocessOutput(t, subprocess, foobarString, fdNumber);
55};
56
57test('.duplex() can use stdout', testReadableDuplexDefault, 1, 'stdout', {}, true);
58test('.duplex() can use stderr', testReadableDuplexDefault, 2, 'stderr', {}, true);

Callers

nothing calls this directly

Calls 2

assertStreamOutputFunction · 0.90
assertSubprocessOutputFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…