MCPcopy Create free account
hub / github.com/sindresorhus/execa / assertDataEvents

Function assertDataEvents

test/convert/readable.js:367–373  ·  view source on GitHub ↗
(t, stream, subprocess)

Source from the content-addressed store, hash-verified

365test('.duplex() can buffer data', testBufferData, 'duplex');
366
367const assertDataEvents = async (t, stream, subprocess) => {
368 const [output] = await once(stream, 'data');
369 t.is(output.toString(), foobarString);
370
371 await finishedStream(stream);
372 await assertSubprocessOutput(t, subprocess);
373};
374
375test('.readable() can be read with "data" events', async t => {
376 const subprocess = getReadableSubprocess();

Callers 1

readable.jsFile · 0.85

Calls 2

finishedStreamFunction · 0.90
assertSubprocessOutputFunction · 0.90

Tested by

no test coverage detected