test: reorder asserts arguments

Revert arguments for assert and ensure that the first
argument is always the actual value being tested.

PR-URL: https://github.com/nodejs/node/pull/23534
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Marcos Frony 2018-10-12 10:15:11 -07:00 committed by Ruben Bridgewater
parent 0d6f014390
commit c3ebc028d2
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -53,7 +53,7 @@ server.on('listening', function() {
setTimeout(function() {
chars_recved = recv.length;
console.log(`pause at: ${chars_recved}`);
assert.strictEqual(true, chars_recved > 1);
assert.strictEqual(chars_recved > 1, true);
client.pause();
setTimeout(function() {
console.log(`resume at: ${chars_recved}`);
@ -86,6 +86,6 @@ server.on('listening', function() {
server.listen(common.PORT);
process.on('exit', function() {
assert.strictEqual(N, recv.length);
assert.strictEqual(recv.length, N);
console.error('Exit');
});