Skip to content

Commit e5a2fa2

Browse files
widatamaMylesBorins
authored andcommitted
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: #23451 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 8a9b2b6 commit e5a2fa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-http-localaddress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const assert = require('assert');
2929

3030
const server = http.createServer(function(req, res) {
3131
console.log(`Connect from: ${req.connection.remoteAddress}`);
32-
assert.strictEqual('127.0.0.2', req.connection.remoteAddress);
32+
assert.strictEqual(req.connection.remoteAddress, '127.0.0.2');
3333

3434
req.on('end', function() {
3535
res.writeHead(200, { 'Content-Type': 'text/plain' });

0 commit comments

Comments
 (0)