Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: switch expected and actual values to align with assertion docum…
…entation
  • Loading branch information
ssamuels0916 committed Oct 12, 2018
commit 19bdab07ba0ca711de6025c50c15800a9361e665
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