Skip to content

Commit

Permalink
chore: add dnsmasq output
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Mar 10, 2023
1 parent 516c53f commit 35a88ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/test.js
@@ -1,4 +1,5 @@
const dns = require('node:dns');
const fs = require('node:fs');
const { Buffer } = require('node:buffer');
const { isIP, isIPv4, isIPv6 } = require('node:net');

Expand All @@ -16,6 +17,22 @@ const { Resolver } = dns.promises;
// NOTE: tests won't work if you're behind a VPN with DNS blackholed
//
test.before(async (t) => {
// echo the output of `/etc/dnsmasq.conf`
try {
t.log('/etc/dnsmasq.conf');
t.log(fs.readFileSync('/etc/dnsmasq.conf'));
} catch (err) {
t.log(err);
}

// echo the output of `/usr/local/etc/dnsmasq.d/localhost.conf`
try {
t.log('/usr/local/etc/dnsmasq.d/localhost.conf');
t.log(fs.readFileSync('/usr/local/etc/dnsmasq.d/localhost.conf'));
} catch (err) {
t.log(err);
}

// log the hosts (useful for debugging)
t.log(Tangerine.HOSTFILE);

Expand Down

0 comments on commit 35a88ed

Please sign in to comment.