Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Sep 22, 2020
1 parent f750a74 commit c215a0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/parallel/test-stream-pipe-error-handling.js
Expand Up @@ -110,12 +110,15 @@ const { Stream, PassThrough } = require('stream');
}

{
const _err = new Error('this should be handled');
const destination = new PassThrough();
destination.once('error', common.mustCall());
destination.once('error', common.mustCall((err) => {
assert.strictEqual(err, _err);
}));

const stream = new Stream();
stream
.pipe(destination);

destination.destroy(new Error('this should be handled'));
destination.destroy(_err);
}

0 comments on commit c215a0e

Please sign in to comment.