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

Function testBufferData

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

Source from the content-addressed store, hash-verified

355});
356
357const testBufferData = async (t, methodName) => {
358 const chunk = '.'.repeat(defaultHighWaterMark).repeat(2);
359 const subprocess = getReadWriteSubprocess();
360 const stream = subprocess[methodName]();
361 subprocess.stdin.end(chunk);
362
363 await assertStreamOutput(t, stream, chunk);
364 await assertSubprocessOutput(t, subprocess, chunk);
365};
366
367test('.readable() can buffer data', testBufferData, 'readable');
368test('.duplex() can buffer data', testBufferData, 'duplex');

Callers

nothing calls this directly

Calls 3

getReadWriteSubprocessFunction · 0.90
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…