From 8345ffb0a033bca06ee9830cad8350b8ac57cd29 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 12 Nov 2016 17:16:03 +0900 Subject: [PATCH] test: add test case of PassThrough This commit adds the test case of PassThrough. This test case checks that PassThrough can construct without new operator. This is a part of Code And Learn at NodeFest 2016 Fixes: https://github.com/nodejs/code-and-learn/issues/58 PR-URL: https://github.com/nodejs/node/pull/9581 Reviewed-By: Yosuke Furukawa Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Shigeki Ohtsu --- test/parallel/test-stream2-transform.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/parallel/test-stream2-transform.js b/test/parallel/test-stream2-transform.js index 8554c965e9481b..39862b1ae28a87 100644 --- a/test/parallel/test-stream2-transform.js +++ b/test/parallel/test-stream2-transform.js @@ -106,6 +106,14 @@ test('object passthrough', function(t) { t.end(); }); +test('passthrough constructor', function(t) { + const pt = PassThrough(); + + assert(pt instanceof PassThrough); + + t.end(); +}); + test('simple transform', function(t) { var pt = new Transform(); pt._transform = function(c, e, cb) {