test: fix arguments order in assert.strictEqual

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: https://github.com/nodejs/node/pull/24143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
szabolcsit authored and Myles Borins committed 2018-12-26 11:18:49 -05:00
1 parent e0c6f5cbf7
commit b63e9cb3fe
1 file changed
+2 -2
+2 -2
View File
@@ -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 = '';
@@ -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');