From 0fcbe2c8ba4147dd1c0121aced4c7edb1699f430 Mon Sep 17 00:00:00 2001 From: Pete Lombardo Date: Fri, 12 Oct 2018 14:02:44 -0400 Subject: [PATCH] test: fix parameter order of assertions PR-URL: https://github.com/nodejs/node/pull/23565 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil --- test/pummel/test-net-throttle.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pummel/test-net-throttle.js b/test/pummel/test-net-throttle.js index a08ed85ccd41bb..fb060c9d76d9d5 100644 --- a/test/pummel/test-net-throttle.js +++ b/test/pummel/test-net-throttle.js @@ -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); @@ -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; @@ -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); });