mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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 <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
1 parent
3829e99b29
commit
aa63e5539e
1 file changed
+1
-1
@@ -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' });
|
||||
|
||||
Reference in new issue
Block a user