Skip to content

Commit aa63e55

Browse files
widatamajasnell
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 3829e99 commit aa63e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: test/parallel/test-http-localaddress.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const assert = require('assert');
3030

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

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

0 commit comments

Comments
 (0)