Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit efdd7c8

Browse filesBrowse files
tniessenMylesBorins
authored andcommitted
test: reuse existing PassThrough implementation
PR-URL: #16936 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 375bec0 commit efdd7c8
Copy full SHA for efdd7c8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-9
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-stream-big-packet.js
+2-9Lines changed: 2 additions & 9 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.