test: assert.strictEqual parameters ordered correctly

The assert.strictEqual function should have the actual
value first and the expected value second to enable
easier debugging of AssertionErrors.

PR-URL: https://github.com/nodejs/node/pull/23538
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:
Justin denBroeder 2018-10-12 10:30:25 -07:00 committed by Ruben Bridgewater
parent c5d0a48fb3
commit 0b0aeda2ce
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -137,7 +137,7 @@ server.listen(0, common.mustCall(function() {
client.stdout.pipe(process.stdout, { end: false });
client.on('exit', common.mustCall(function(code) {
assert.strictEqual(0, code);
assert.strictEqual(code, 0);
server.close();
}));
}));