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 46bbabe

Browse filesBrowse files
stefanjudisItalo A. Casas
authored andcommitted
test: improve test-stream2-large-read-stall
* use const instead of var * use assert.strictEqual instead of assert.equal * use common.mustCall instead of process.on( 'exit', fn ) PR-URL: #10725 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
1 parent 7f04377 commit 46bbabe
Copy full SHA for 46bbabe

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-stream2-large-read-stall.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream2-large-read-stall.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ r.on('readable', function() {
3333
rs.length);
3434
});
3535

36-
r.on('end', common.mustCall(function() {}));
36+
r.on('end', common.mustCall(function() {
37+
assert.strictEqual(pushes, PUSHCOUNT + 1);
38+
}));
3739

3840
let pushes = 0;
3941
function push() {
@@ -49,7 +51,3 @@ function push() {
4951
if (r.push(Buffer.allocUnsafe(PUSHSIZE)))
5052
setTimeout(push, 1);
5153
}
52-
53-
process.on('exit', function() {
54-
assert.strictEqual(pushes, PUSHCOUNT + 1);
55-
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.