Skip to content

Commit d5485ec

Browse files
lrdcasimirjasnell
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: #23520 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent ff5f1fb commit d5485ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: 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)