Skip to content

Commit ad6b09f

Browse files
lrdcasimirBridgeAR
authored andcommitted
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: nodejs#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>
1 parent 101812e commit ad6b09f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/pummel/test-net-many-clients.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function runClient(callback) {
7070

7171
client.on('close', function(had_error) {
7272
console.log('.');
73-
assert.strictEqual(false, had_error);
74-
assert.strictEqual(bytes, client.recved.length);
73+
assert.strictEqual(had_error, false);
74+
assert.strictEqual(client.recved.length, bytes);
7575

7676
if (client.fd) {
7777
console.log(client.fd);
@@ -96,6 +96,6 @@ server.listen(common.PORT, function() {
9696
});
9797

9898
process.on('exit', function() {
99-
assert.strictEqual(connections_per_client * concurrency, total_connections);
99+
assert.strictEqual(total_connections, connections_per_client * concurrency);
100100
console.log('\nokay!');
101101
});

0 commit comments

Comments
 (0)