Skip to content

Commit 44b2bbe

Browse files
kt3kMylesBorins
authored andcommitted
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: 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>
1 parent 36f4836 commit 44b2bbe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/parallel/test-stream2-transform.js

+8
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ test('object passthrough', function(t) {
106106
t.end();
107107
});
108108

109+
test('passthrough constructor', function(t) {
110+
const pt = PassThrough();
111+
112+
assert(pt instanceof PassThrough);
113+
114+
t.end();
115+
});
116+
109117
test('simple transform', function(t) {
110118
var pt = new Transform();
111119
pt._transform = function(c, e, cb) {

0 commit comments

Comments
 (0)