From 0d6fda53968c1e441cdc711d66aa1dd3c16791cb Mon Sep 17 00:00:00 2001 From: szabolcsit Date: Tue, 6 Nov 2018 15:33:38 +0100 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- test/parallel/test-http-client-upload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-client-upload.js b/test/parallel/test-http-client-upload.js index 000bf1d58424a3..830c37da8ef567 100644 --- a/test/parallel/test-http-client-upload.js +++ b/test/parallel/test-http-client-upload.js @@ -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');