Skip to content

Commit

Permalink
test: fix arguments order in assert.strictEqual
Browse files Browse the repository at this point in the history
In the test test/parallel/test-http-client-upload.js test the
actual and expected arguments in assert.strictEqual() calls
were in the wrong order. Switched them around so the returned
value by the function is the first argument and the literal
value is the second argument.

PR-URL: #24143
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
szabolcsit authored and MylesBorins committed Dec 26, 2018
1 parent e0c6f5c commit b63e9cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-client-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const assert = require('assert');
const http = require('http');

const server = http.createServer(common.mustCall(function(req, res) {
assert.strictEqual('POST', req.method);
assert.strictEqual(req.method, 'POST');
req.setEncoding('utf8');

let sent_body = '';
Expand All @@ -36,7 +36,7 @@ const server = http.createServer(common.mustCall(function(req, res) {
});

req.on('end', common.mustCall(function() {
assert.strictEqual('1\n2\n3\n', sent_body);
assert.strictEqual(sent_body, '1\n2\n3\n');
console.log('request complete from server');
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('hello\n');
Expand Down

0 comments on commit b63e9cb

Please sign in to comment.