Skip to content

Commit

Permalink
test: use the correct parameter order on assert.strictEqual()
Browse files Browse the repository at this point in the history
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: #23520
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
lrdcasimir authored and MylesBorins committed Oct 30, 2018
1 parent 100ed74 commit ad83caf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/pummel/test-net-many-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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!');
});

0 comments on commit ad83caf

Please sign in to comment.