test: fix assert.strictEqual params order

PR-URL: https://github.com/nodejs/node/pull/23480
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
pull/23485/merge
Rock Hu 2018-10-12 10:06:36 -07:00 committed by Anna Henningsen
parent c19ab565ca
commit cb6c33e368
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ const tcp = net.Server(common.mustCall((s) => {
s.on('data', (d) => {
tcpLengthSeen += d.length;
for (let j = 0; j < d.length; j++) {
assert.strictEqual(buffer[i], d[j]);
assert.strictEqual(d[j], buffer[i]);
i++;
}
});
@ -103,7 +103,7 @@ function startClient() {
}, common.mustCall((res) => {
res.setEncoding('utf8');
res.on('data', common.mustCall((string) => {
assert.strictEqual('thanks', string);
assert.strictEqual(string, 'thanks');
gotThanks = true;
}));
}));
@ -113,5 +113,5 @@ function startClient() {
process.on('exit', () => {
assert.ok(gotThanks);
assert.strictEqual(bufferSize, tcpLengthSeen);
assert.strictEqual(tcpLengthSeen, bufferSize);
});