From e1759a4a041738b86ec0abc58bb180f313674ab0 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 https://github.com/nodejs/code-and-learn/issues/58 --- 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 bc812ff30d6937..6a4036681f90b7 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) {