Skip to content
Myr

Fix flaky test

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

authored by Sindre Sorhus · committed by Sindre Sorhus · parent 9a7a162 · Browse files · 1 file+3 added−1 removed
This commit

State

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

Diff stats

1 file+3 added−1 removed

  • tests:+3 added−1 removed

1 file+3 added−1 removed

modified:test/pipe/sequence.js+3 added-1 removed
350 unmodified lines
351 const destination = execa('head', ['-n', '1'], {stdin: useStdinTransform ? noopGenerator(false) : 'pipe'});352 const pipePromise = source.pipe(destination);353 t.is(await t.throwsAsync(pipePromise), await t.throwsAsync(source));354 t.like(await destination, {stdout: 'y'});355 t.like(await t.throwsAsync(source), {exitCode: 1, stderr: 'yes: standard output: Connection reset by peer'});355 const sourceError = await t.throwsAsync(source);356 t.is(sourceError.exitCode, 1);357 t.regex(sourceError.stderr, /^yes: standard output: (?:Broken pipe|Connection reset by peer)$/);358359 t.false(source.stdout.readableEnded);360 t.is(source.stdout.errored, null);361 t.true(source.stdout.destroyed);
20 unmodified lines