Skip to content

Commit cbc140f

Browse files
n370jasnell
authored andcommitted
test: swap the order arguments are passed to assert
Documentation for assertions rule actual values should be passed first followed by the expected value. This commit update the assertions the changed file contains to comply to that rule. Changes also label the assertions. PR-URL: #23580 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 3c329be commit cbc140f

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

test/pummel/test-keep-alive.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,20 @@ server.listen(common.PORT, () => {
104104
});
105105

106106
process.on('exit', function() {
107-
assert.strictEqual(true, normalReqSec > 50);
108-
assert.strictEqual(true, keepAliveReqSec > 50);
109-
assert.strictEqual(true, normalReqSec < keepAliveReqSec);
107+
assert.strictEqual(
108+
normalReqSec > 50,
109+
true,
110+
`normalReqSec should be greater than 50, but got ${normalReqSec}`
111+
);
112+
assert.strictEqual(
113+
keepAliveReqSec > 50,
114+
true,
115+
`keepAliveReqSec should be greater than 50, but got ${keepAliveReqSec}`
116+
);
117+
assert.strictEqual(
118+
normalReqSec < keepAliveReqSec,
119+
true,
120+
'normalReqSec should be less than keepAliveReqSec, ' +
121+
`but ${normalReqSec} is greater than ${keepAliveReqSec}`
122+
);
110123
});

0 commit comments

Comments
 (0)