From f0eeddb4b8c87f22fb3f330fbbd78021964c6682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 10 Nov 2017 18:27:35 +0100 Subject: [PATCH] test: reuse existing PassThrough implementation PR-URL: https://github.com/nodejs/node/pull/16936 Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-stream-big-packet.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-stream-big-packet.js b/test/parallel/test-stream-big-packet.js index 09ed825036f2e4..9a5828f1fa7230 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -5,13 +5,6 @@ const stream = require('stream'); let passed = false; -class PassThrough extends stream.Transform { - _transform(chunk, encoding, done) { - this.push(chunk); - done(); - } -} - class TestStream extends stream.Transform { _transform(chunk, encoding, done) { if (!passed) { @@ -22,8 +15,8 @@ class TestStream extends stream.Transform { } } -const s1 = new PassThrough(); -const s2 = new PassThrough(); +const s1 = new stream.PassThrough(); +const s2 = new stream.PassThrough(); const s3 = new TestStream(); s1.pipe(s3); // Don't let s2 auto close which may close s3