Skip to content

Commit

Permalink
test: fix assert.strictEqual() argument order
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
ssamuels0916 authored and BridgeAR committed Oct 15, 2018
1 parent d51d1ad commit 5ae0f11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-http-buffer-sanity.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ const server = http.Server(function(req, res) {
req.on('data', (d) => {
measuredSize += d.length;
for (let j = 0; j < d.length; j++) {
assert.strictEqual(buffer[i], d[j]);
assert.strictEqual(d[j], buffer[i]);
i++;
}
});

req.on('end', common.mustCall(() => {
assert.strictEqual(bufferSize, measuredSize);
assert.strictEqual(measuredSize, bufferSize);
res.writeHead(200);
res.write('thanks');
res.end();
Expand All @@ -64,7 +64,7 @@ server.listen(0, common.mustCall(() => {
let data = '';
res.on('data', (chunk) => data += chunk);
res.on('end', common.mustCall(() => {
assert.strictEqual('thanks', data);
assert.strictEqual(data, 'thanks');
}));
}));
req.end(buffer);
Expand Down

0 comments on commit 5ae0f11

Please sign in to comment.