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:
parent
101812e0a9
commit
ad6b09f709
@ -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!');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user