Skip to content

Commit

Permalink
test: fix parameter order of assertions
Browse files Browse the repository at this point in the history
PR-URL: nodejs#23565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
obxpete authored and BridgeAR committed Oct 15, 2018
1 parent 199a271 commit 66a0f1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/pummel/test-net-throttle.js
Expand Up @@ -37,7 +37,7 @@ console.log(`start server on port ${common.PORT}`);
const server = net.createServer(function(connection) {
connection.write(body.slice(0, part_N));
connection.write(body.slice(part_N, 2 * part_N));
assert.strictEqual(false, connection.write(body.slice(2 * part_N, N)));
assert.strictEqual(connection.write(body.slice(2 * part_N, N)), false);
console.log(`bufferSize: ${connection.bufferSize}`, 'expecting', N);
assert.ok(connection.bufferSize >= 0 &&
connection.writableLength <= N);
Expand All @@ -58,7 +58,7 @@ server.listen(common.PORT, function() {
console.log('pause');
const x = chars_recved;
setTimeout(function() {
assert.strictEqual(chars_recved, x);
assert.strictEqual(x, chars_recved);
client.resume();
console.log('resume');
paused = false;
Expand All @@ -74,6 +74,6 @@ server.listen(common.PORT, function() {


process.on('exit', function() {
assert.strictEqual(N, chars_recved);
assert.strictEqual(true, npauses > 2);
assert.strictEqual(chars_recved, N);
assert.strictEqual(npauses > 2, true);
});

0 comments on commit 66a0f1f

Please sign in to comment.