mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/10725 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
This commit is contained in:
1 parent
7f043779eb
commit
46bbabe6c2
1 file changed
+3
-5
@@ -33,7 +33,9 @@ r.on('readable', function() {
|
||||
rs.length);
|
||||
});
|
||||
|
||||
r.on('end', common.mustCall(function() {}));
|
||||
r.on('end', common.mustCall(function() {
|
||||
assert.strictEqual(pushes, PUSHCOUNT + 1);
|
||||
}));
|
||||
|
||||
let pushes = 0;
|
||||
function push() {
|
||||
@@ -49,7 +51,3 @@ function push() {
|
||||
if (r.push(Buffer.allocUnsafe(PUSHSIZE)))
|
||||
setTimeout(push, 1);
|
||||
}
|
||||
|
||||
process.on('exit', function() {
|
||||
assert.strictEqual(pushes, PUSHCOUNT + 1);
|
||||
});
|
||||
Reference in new issue
Block a user