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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
  • Loading branch information
kt3k authored and MylesBorins committed Dec 21, 2016
1 parent cf39cf8 commit 1c294b3
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 1c294b3

Please sign in to comment.