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: https://github.com/nodejs/code-and-learn/issues/58 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
1fca11e114
commit
63e889a256
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user