Skip to content

Commit

Permalink
test: add test case of PassThrough
Browse files Browse the repository at this point in the history
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: nodejs/code-and-learn#58
PR-URL: #9581
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
  • Loading branch information
kt3k authored and MylesBorins committed Dec 20, 2016
1 parent beb147a commit 8345ffb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parallel/test-stream2-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8345ffb

Please sign in to comment.