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

Function testFileReadableError

test/stdio/node-stream-native.js:103–110  ·  view source on GitHub ↗
(t, fdNumber)

Source from the content-addressed store, hash-verified

101test('stdio[*] can be a Node.js Readable with a file descriptor - sync', testFileReadable, 3, execaSync);
102
103const testFileReadableError = async (t, fdNumber) => {
104 const {stream, filePath} = await createFileReadStream();
105
106 const fdNumberString = fdNumber === 'input' ? '0' : `${fdNumber}`;
107 const subprocess = execa('stdin-fd.js', [fdNumberString], getStdio(fdNumber, stream));
108
109 await assertFileStreamError(t, subprocess, stream, filePath);
110};
111
112test.serial('input handles errors from a Node.js Readable with a file descriptor', testFileReadableError, 'input');
113test.serial('stdin handles errors from a Node.js Readable with a file descriptor', testFileReadableError, 0);

Callers

nothing calls this directly

Calls 3

getStdioFunction · 0.90
createFileReadStreamFunction · 0.85
assertFileStreamErrorFunction · 0.85

Tested by

no test coverage detected