镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Commit ad83caf

Browse files
lrdcasimirMylesBorins
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 <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 100ed74 commit ad83caf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
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)