Skip to content

Commit ffab8ba

Browse files
fronyjasnell
authored andcommitted
test: reorder asserts arguments
Revert arguments for assert and ensure that the first argument is always the actual value being tested. PR-URL: #23534 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 26fa85c commit ffab8ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: test/pummel/test-net-pause.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ server.on('listening', function() {
5353
setTimeout(function() {
5454
chars_recved = recv.length;
5555
console.log(`pause at: ${chars_recved}`);
56-
assert.strictEqual(true, chars_recved > 1);
56+
assert.strictEqual(chars_recved > 1, true);
5757
client.pause();
5858
setTimeout(function() {
5959
console.log(`resume at: ${chars_recved}`);
@@ -86,6 +86,6 @@ server.on('listening', function() {
8686
server.listen(common.PORT);
8787

8888
process.on('exit', function() {
89-
assert.strictEqual(N, recv.length);
89+
assert.strictEqual(recv.length, N);
9090
console.error('Exit');
9191
});

0 commit comments

Comments
 (0)