(t, fdNumber, useSingle, execaMethod)
| 114 | test.serial('stdio[*] handles errors from a Node.js Readable with a file descriptor', testFileReadableError, 3); |
| 115 | |
| 116 | const testFileReadableOpen = async (t, fdNumber, useSingle, execaMethod) => { |
| 117 | const {stream, filePath} = await createFileReadStream(); |
| 118 | t.deepEqual(stream.eventNames(), []); |
| 119 | |
| 120 | const stdioOption = useSingle ? stream : [stream, 'pipe']; |
| 121 | await execaMethod('empty.js', getStdio(fdNumber, stdioOption)); |
| 122 | |
| 123 | t.is(stream.readable, useSingle && fdNumber !== 'input'); |
| 124 | t.deepEqual(stream.eventNames(), []); |
| 125 | |
| 126 | await rm(filePath); |
| 127 | }; |
| 128 | |
| 129 | test('input closes a Node.js Readable with a file descriptor', testFileReadableOpen, 'input', true, execa); |
| 130 | test('stdin leaves open a single Node.js Readable with a file descriptor', testFileReadableOpen, 0, true, execa); |
nothing calls this directly
no test coverage detected