Skip to content

Commit 522654a

Browse files
committed
Fix flaky test
1 parent 9a7a162 commit 522654a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/pipe/sequence.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ if (isLinux) {
352352
const pipePromise = source.pipe(destination);
353353
t.is(await t.throwsAsync(pipePromise), await t.throwsAsync(source));
354354
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)$/);
356358

357359
t.false(source.stdout.readableEnded);
358360
t.is(source.stdout.errored, null);

0 commit comments

Comments
 (0)