(t, methodName)
| 13 | setFixtureDirectory(); |
| 14 | |
| 15 | const testSubprocessFail = async (t, methodName) => { |
| 16 | const subprocess = getReadWriteSubprocess(); |
| 17 | const stream = subprocess[methodName](); |
| 18 | |
| 19 | const cause = new Error(foobarString); |
| 20 | subprocess.kill(cause); |
| 21 | |
| 22 | const error = await assertStreamError(t, stream, {cause}); |
| 23 | assertWritableAborted(t, subprocess.stdin); |
| 24 | t.true(subprocess.stdout.readableEnded); |
| 25 | t.true(subprocess.stderr.readableEnded); |
| 26 | |
| 27 | await assertSubprocessError(t, subprocess, error); |
| 28 | }; |
| 29 | |
| 30 | test('subprocess fail -> .readable() error', testSubprocessFail, 'readable'); |
| 31 | test('subprocess fail -> .writable() error', testSubprocessFail, 'writable'); |
nothing calls this directly
no test coverage detected
searching dependent graphs…