Skip to content

Commit

Permalink
test: swap the order arguments are passed to assert
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
n370 authored and MylesBorins committed Oct 30, 2018
1 parent 5e1b9c3 commit c73a6a0
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions test/pummel/test-keep-alive.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,20 @@ server.listen(common.PORT, () => {
});

process.on('exit', function() {
assert.strictEqual(true, normalReqSec > 50);
assert.strictEqual(true, keepAliveReqSec > 50);
assert.strictEqual(true, normalReqSec < keepAliveReqSec);
assert.strictEqual(
normalReqSec > 50,
true,
`normalReqSec should be greater than 50, but got ${normalReqSec}`
);
assert.strictEqual(
keepAliveReqSec > 50,
true,
`keepAliveReqSec should be greater than 50, but got ${keepAliveReqSec}`
);
assert.strictEqual(
normalReqSec < keepAliveReqSec,
true,
'normalReqSec should be less than keepAliveReqSec, ' +
`but ${normalReqSec} is greater than ${keepAliveReqSec}`
);
});

0 comments on commit c73a6a0

Please sign in to comment.