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 addaleax committed Oct 20, 2018
1 parent e912533 commit c6bc9e7
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 c6bc9e7

Please sign in to comment.