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 <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>
This commit is contained in:
Tyler Vann-Campbell 2018-10-12 10:03:45 -07:00 committed by Ruben Bridgewater
parent 101812e0a9
commit ad6b09f709
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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!');
});