From c215a0e066f04ab12cd85ab0b975e1f50521f425 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 22 Sep 2020 22:54:58 +0200 Subject: [PATCH] fixup --- test/parallel/test-stream-pipe-error-handling.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-stream-pipe-error-handling.js b/test/parallel/test-stream-pipe-error-handling.js index ea10de14b8240f..cf3a3699d0975d 100644 --- a/test/parallel/test-stream-pipe-error-handling.js +++ b/test/parallel/test-stream-pipe-error-handling.js @@ -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); }