Skip to content

Commit b01db3a

Browse files
stefanjudisMylesBorins
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 <[email protected]> Reviewed-By: Italo A. Casas <[email protected]>
1 parent 76f0556 commit b01db3a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ r.on('readable', function() {
3232
rs.length);
3333
});
3434

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

3739
var pushes = 0;
3840
function push() {
@@ -48,7 +50,3 @@ function push() {
4850
if (r.push(Buffer.allocUnsafe(PUSHSIZE)))
4951
setTimeout(push, 1);
5052
}
51-
52-
process.on('exit', function() {
53-
assert.equal(pushes, PUSHCOUNT + 1);
54-
});

0 commit comments

Comments
 (0)