From e5a2fa2dcb224fa1a3d4f66cf80dfc157ac9179c 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 0ed048688eefae..1c81203ff163eb 100644 --- a/test/parallel/test-http-localaddress.js +++ b/test/parallel/test-http-localaddress.js @@ -29,7 +29,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' });