mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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:
1 parent
f128008474
commit
e1a55e76b4
1 file changed
+5
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user