test: fix assert.strictEqual() argument order
PR-URL: https://github.com/nodejs/node/pull/23529 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
d51d1ad4c8
commit
5ae0f111dc
@ -40,13 +40,13 @@ const server = http.Server(function(req, res) {
|
|||||||
req.on('data', (d) => {
|
req.on('data', (d) => {
|
||||||
measuredSize += d.length;
|
measuredSize += 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++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
req.on('end', common.mustCall(() => {
|
req.on('end', common.mustCall(() => {
|
||||||
assert.strictEqual(bufferSize, measuredSize);
|
assert.strictEqual(measuredSize, bufferSize);
|
||||||
res.writeHead(200);
|
res.writeHead(200);
|
||||||
res.write('thanks');
|
res.write('thanks');
|
||||||
res.end();
|
res.end();
|
||||||
@ -64,7 +64,7 @@ server.listen(0, common.mustCall(() => {
|
|||||||
let data = '';
|
let data = '';
|
||||||
res.on('data', (chunk) => data += chunk);
|
res.on('data', (chunk) => data += chunk);
|
||||||
res.on('end', common.mustCall(() => {
|
res.on('end', common.mustCall(() => {
|
||||||
assert.strictEqual('thanks', data);
|
assert.strictEqual(data, 'thanks');
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
req.end(buffer);
|
req.end(buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user