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

Commit c73a6a0

Browse files
n370MylesBorins
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 5e1b9c3 commit c73a6a0

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

‎test/pummel/test-keep-alive.js‎

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