From 211f4b1151b5b1f50338aba9726af0e8cb2f9f09 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. --- 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 657b03abdec205..db7da1ae041341 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!'); });