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

Function testBuffering

test/convert/readable.js:71–80  ·  view source on GitHub ↗
(t, methodName)

Source from the content-addressed store, hash-verified

69test('.readable() uses stderr if "all" is used', testReadableDefault, 2, 'all', {all: true}, true);
70
71const testBuffering = async (t, methodName) => {
72 const subprocess = execa('noop-stdin-fd.js', ['1'], {buffer: false});
73 const stream = subprocess[methodName]();
74
75 subprocess.stdin.write(foobarString);
76 await once(subprocess.stdout, 'readable');
77 subprocess.stdin.end();
78
79 await assertStreamOutput(t, stream);
80};
81
82test('.readable() buffers until read', testBuffering, 'readable');
83test('.duplex() buffers until read', testBuffering, 'duplex');

Callers

nothing calls this directly

Calls 1

assertStreamOutputFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…