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: nodejs#26570
Refs: nodejs#25870
Refs: nodejs#26473
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
refack authored and BridgeAR committed Mar 14, 2019
1 parent f128008 commit 155cc34
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 155cc34

Please sign in to comment.