Skip to content

Commit

Permalink
fixup! chore: add localhost lookup test
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Oct 25, 2024
1 parent d313c85 commit c09f48e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/cli/host-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const os = require('os')
const fs = require('fs')
const dns = require('dns')
let { test, fail, comment } = require('tap')
const { serve } = require('./common')
Expand Down Expand Up @@ -69,6 +70,7 @@ function checkConnections (t, req, canConnect) {
}

test('localhost resolution', (t) => {
console.error('/etc/hosts\n' + fs.readFileSync('/etc/hosts', 'utf8'))
dns.lookup('localhost', (err, address, family) => {
t.error(err)
t.equal('127.0.0.1', address)
Expand Down

0 comments on commit c09f48e

Please sign in to comment.