Skip to content

Commit

Permalink
dns: fix linter errors
Browse files Browse the repository at this point in the history
PR-URL: #39987
Fixes: #31566
Refs: #6307
Refs: #20710
Refs: #38099
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
treysis authored and nodejs-github-bot committed Sep 12, 2021
1 parent 2d7466e commit a08162d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-net-pingpong.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
pingPongTest(common.PIPE);
pingPongTest(0);
common.hasIPv6 ? pingPongTest(0, '::1') : pingPongTest(0, '127.0.0.1');
if (common.hasIPv6) pingPongTest(0, '::1'); else pingPongTest(0, '127.0.0.1');
6 changes: 3 additions & 3 deletions test/parallel/test-net-remote-address-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const remoteFamilyCandidates = ['IPv4'];
if (common.hasIPv6) remoteFamilyCandidates.push('IPv6');

const server = net.createServer(common.mustCall(function(socket) {
// test to see real value in CI log
// Test to see real value in CI log
assert.match(socket.remoteAddress,
/^127\.0\.0\.1$|^::1$|^::ffff:127.0.0.1$/);
// assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
/^127\.0\.0\.1$|^::1$|^::ffff:127\.0\.0\.1$/);
// REM: assert.ok(remoteAddrCandidates.includes(socket.remoteAddress));
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily));
assert.ok(socket.remotePort);
assert.notStrictEqual(socket.remotePort, this.address().port);
Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-net-pingpong.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function pingPongTest(host, on_complete) {

// All are run at once and will run on different ports.
pingPongTest(null);
common.hasIPv6 ? pingPongTest('::1') : pingPongTest('127.0.0.1');
if (common.hasIPv6) pingPongTest('::1'); else pingPongTest('127.0.0.1');

process.on('exit', function() {
assert.strictEqual(tests_run, common.hasIPv6 ? 3 : 2);
Expand Down

0 comments on commit a08162d

Please sign in to comment.