mirror of https://github.com/nodejs/node.git
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>
This commit is contained in:
parent
c19ab565ca
commit
cb6c33e368
|
@ -75,7 +75,7 @@ const tcp = net.Server(common.mustCall((s) => {
|
||||||
s.on('data', (d) => {
|
s.on('data', (d) => {
|
||||||
tcpLengthSeen += d.length;
|
tcpLengthSeen += d.length;
|
||||||
for (let j = 0; j < d.length; j++) {
|
for (let j = 0; j < d.length; j++) {
|
||||||
assert.strictEqual(buffer[i], d[j]);
|
assert.strictEqual(d[j], buffer[i]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -103,7 +103,7 @@ function startClient() {
|
||||||
}, common.mustCall((res) => {
|
}, common.mustCall((res) => {
|
||||||
res.setEncoding('utf8');
|
res.setEncoding('utf8');
|
||||||
res.on('data', common.mustCall((string) => {
|
res.on('data', common.mustCall((string) => {
|
||||||
assert.strictEqual('thanks', string);
|
assert.strictEqual(string, 'thanks');
|
||||||
gotThanks = true;
|
gotThanks = true;
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
|
@ -113,5 +113,5 @@ function startClient() {
|
||||||
|
|
||||||
process.on('exit', () => {
|
process.on('exit', () => {
|
||||||
assert.ok(gotThanks);
|
assert.ok(gotThanks);
|
||||||
assert.strictEqual(bufferSize, tcpLengthSeen);
|
assert.strictEqual(tcpLengthSeen, bufferSize);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue