Skip to content
Myr

Ensure process exits on stream errors (#607)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent 9a641b0 · Browse files · 2 files+14 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+14 added−7 removed

  • tests:+6 added−0 removed
  • other:+8 added−7 removed

2 files+14 added−7 removed

modified:lib/stream.js+8 added-7 removed
modified:test/stream.js+6 added
296 unmodified lines
297 const {timedOut} = await t.throwsAsync(subprocess);298 t.true(timedOut);299 });300}301302test('Errors on streams should make the process exit', async t => {303 const childProcess = execa('forever');304 childProcess.stdout.destroy();305 await t.throwsAsync(childProcess, {code: 'ERR_STREAM_PREMATURE_CLOSE'});306});