test: fix syntax error in test-dns-idna2008.js when failing

Fixes a bug I introduced in 961322178d

PR-URL: https://github.com/nodejs/node/pull/26570
Refs: https://github.com/nodejs/node/issues/25870
Refs: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Refael Ackermann authored and Ruben Bridgewater committed 2019-03-14 17:15:23 +01:00
1 parent f128008474
commit e1a55e76b4
1 file changed
+5 -3
+5 -3
View File
@@ -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);