Skip to content

Commit

Permalink
test: fix syntax error in test-dns-idna2008.js when failing
Browse files Browse the repository at this point in the history
Fixes a bug I introduced in 9613221

PR-URL: #26570
Refs: #25870
Refs: #26473
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
refack authored and BridgeAR committed Mar 14, 2019
1 parent cc0ffc5 commit f2eeb38
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/internet/test-dns-idna2008.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ dns.lookup(fixture.hostname, mustCall((err, address) => {
assert.strictEqual(address, fixture.expectedAddress);
}));

dns.promises.lookup(fixture.hostname).then(mustCall(({ address }) => {
dns.promises.lookup(fixture.hostname).then(({ address }) => {
assert.strictEqual(address, fixture.expectedAddress);
}).catch((err) => {
}, (err) => {
if (err && err.errno === 'ESERVFAIL') {
assert.ok(err.message.includes('queryA ESERVFAIL straße.de'));
} else {
throw err;
}
}));
}).finally(mustCall());

dns.resolve4(fixture.hostname, mustCall((err, addresses) => {
assert.ifError(err);
Expand Down

0 comments on commit f2eeb38

Please sign in to comment.