(t, fdNumber, useSingle, execaMethod)
| 162 | test.serial('stdio[*] handles errors from a Node.js Writable with a file descriptor', testFileWritableError, 3); |
| 163 | |
| 164 | const testFileWritableOpen = async (t, fdNumber, useSingle, execaMethod) => { |
| 165 | const {stream, filePath} = await createFileWriteStream(); |
| 166 | t.deepEqual(stream.eventNames(), []); |
| 167 | |
| 168 | const stdioOption = useSingle ? stream : [stream, 'pipe']; |
| 169 | await execaMethod('empty.js', getStdio(fdNumber, stdioOption)); |
| 170 | |
| 171 | t.is(stream.writable, useSingle); |
| 172 | t.deepEqual(stream.eventNames(), []); |
| 173 | |
| 174 | await rm(filePath); |
| 175 | }; |
| 176 | |
| 177 | test('stdout leaves open a single Node.js Writable with a file descriptor', testFileWritableOpen, 1, true, execa); |
| 178 | test('stdout closes a combined Node.js Writable with a file descriptor', testFileWritableOpen, 1, false, execa); |
nothing calls this directly
no test coverage detected