From 859abdbfeb44f6a940c589a5ff864fb23ecaa597 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 18b9b7ee4fc348..ae9bfeed4c2412 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -26,13 +26,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) { @@ -43,8 +36,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