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

Function testFileWritableError

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

Source from the content-addressed store, hash-verified

150test('stdio[*] can be a Node.js Writable with a file descriptor - sync', testFileWritable, 3, execaSync);
151
152const testFileWritableError = async (t, fdNumber) => {
153 const {stream, filePath} = await createFileWriteStream();
154
155 const subprocess = execa('noop-fd.js', [`${fdNumber}`, foobarString], getStdio(fdNumber, stream));
156
157 await assertFileStreamError(t, subprocess, stream, filePath);
158};
159
160test.serial('stdout handles errors from a Node.js Writable with a file descriptor', testFileWritableError, 1);
161test.serial('stderr handles errors from a Node.js Writable with a file descriptor', testFileWritableError, 2);

Callers

nothing calls this directly

Calls 3

getStdioFunction · 0.90
createFileWriteStreamFunction · 0.85
assertFileStreamErrorFunction · 0.85

Tested by

no test coverage detected