Skip to content

Commit 0599e38

Browse files
committed
test: reuse existing PassThrough implementation
1 parent 36e9574 commit 0599e38

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/parallel/test-stream-big-packet.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ const stream = require('stream');
2626

2727
let passed = false;
2828

29-
class PassThrough extends stream.Transform {
30-
_transform(chunk, encoding, done) {
31-
this.push(chunk);
32-
done();
33-
}
34-
}
35-
3629
class TestStream extends stream.Transform {
3730
_transform(chunk, encoding, done) {
3831
if (!passed) {
@@ -43,8 +36,8 @@ class TestStream extends stream.Transform {
4336
}
4437
}
4538

46-
const s1 = new PassThrough();
47-
const s2 = new PassThrough();
39+
const s1 = new stream.PassThrough();
40+
const s2 = new stream.PassThrough();
4841
const s3 = new TestStream();
4942
s1.pipe(s3);
5043
// Don't let s2 auto close which may close s3

0 commit comments

Comments
 (0)