From ad6b09f7099846f7db49c88e2aacffe6a789c73f Mon Sep 17 00:00:00 2001 From: Tyler Vann-Campbell Date: Fri, 12 Oct 2018 10:03:45 -0700 Subject: [PATCH] test: use the correct parameter order on assert.strictEqual() The parameter order for assert.strictEqual() should be actual, expected rather than expected, actual which can make test failure messages confusing. This change reverses the order of the assertion to match the documented parameter order. PR-URL: https://github.com/nodejs/node/pull/23520 Reviewed-By: Guy Bedford Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- test/pummel/test-net-many-clients.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pummel/test-net-many-clients.js b/test/pummel/test-net-many-clients.js index 657b03abdec..db7da1ae041 100644 --- a/test/pummel/test-net-many-clients.js +++ b/test/pummel/test-net-many-clients.js @@ -70,8 +70,8 @@ function runClient(callback) { client.on('close', function(had_error) { console.log('.'); - assert.strictEqual(false, had_error); - assert.strictEqual(bytes, client.recved.length); + assert.strictEqual(had_error, false); + assert.strictEqual(client.recved.length, bytes); if (client.fd) { console.log(client.fd); @@ -96,6 +96,6 @@ server.listen(common.PORT, function() { }); process.on('exit', function() { - assert.strictEqual(connections_per_client * concurrency, total_connections); + assert.strictEqual(total_connections, connections_per_client * concurrency); console.log('\nokay!'); });