Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
nodejs/code-and-learn#58
  • Loading branch information
kt3k committed Nov 12, 2016
commit e1759a4a041738b86ec0abc58bb180f313674ab0
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