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

Function testReadableDefault

test/convert/readable.js:52–58  ·  view source on GitHub ↗
(t, fdNumber, from, options, hasResult)

Source from the content-addressed store, hash-verified

50
51// eslint-disable-next-line max-params
52const testReadableDefault = async (t, fdNumber, from, options, hasResult) => {
53 const subprocess = execa('noop-fd.js', [`${fdNumber}`, foobarString], options);
54 const stream = subprocess.readable({from});
55
56 await assertStreamOutput(t, stream, hasResult ? foobarString : '');
57 await assertSubprocessOutput(t, subprocess, foobarString, fdNumber);
58};
59
60test('.readable() can use stdout', testReadableDefault, 1, 'stdout', {}, true);
61test('.readable() can use stderr', testReadableDefault, 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…