From dee9d27923ecb4b9cc8aaa0e233d712d802c2d0c Mon Sep 17 00:00:00 2001 From: Danu Widatama Date: Fri, 12 Oct 2018 09:05:57 -0700 Subject: [PATCH] test: fix http local address test assertion Reverse the argument for assertion. The first argument should be the actual value and the second value should be the expected value. When there is an AssertionError, the expected and actual value will be labeled correctly. PR-URL: https://github.com/nodejs/node/pull/23451 Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-http-localaddress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http-localaddress.js b/test/parallel/test-http-localaddress.js index 8c5e57b118b597..6763fae1265ac3 100644 --- a/test/parallel/test-http-localaddress.js +++ b/test/parallel/test-http-localaddress.js @@ -30,7 +30,7 @@ const assert = require('assert'); const server = http.createServer(function(req, res) { console.log(`Connect from: ${req.connection.remoteAddress}`); - assert.strictEqual('127.0.0.2', req.connection.remoteAddress); + assert.strictEqual(req.connection.remoteAddress, '127.0.0.2'); req.on('end', function() { res.writeHead(200, { 'Content-Type': 'text/plain' });