Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad83caf

Browse filesBrowse 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
Copy full SHA for ad83caf

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/pummel/test-net-many-clients.js
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.