Skip to content

Commit e1a55e7

Browse files
refackBridgeAR
authored andcommitted
test: fix syntax error in test-dns-idna2008.js when failing
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>
1 parent f128008 commit e1a55e7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/internet/test-dns-idna2008.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ dns.lookup(fixture.hostname, mustCall((err, address) => {
3232
assert.strictEqual(address, fixture.expectedAddress);
3333
}));
3434

35-
dns.promises.lookup(fixture.hostname).then(mustCall(({ address }) => {
35+
dns.promises.lookup(fixture.hostname).then(({ address }) => {
3636
assert.strictEqual(address, fixture.expectedAddress);
37-
}).catch((err) => {
37+
}, (err) => {
3838
if (err && err.errno === 'ESERVFAIL') {
3939
assert.ok(err.message.includes('queryA ESERVFAIL straße.de'));
40+
} else {
41+
throw err;
4042
}
41-
}));
43+
}).finally(mustCall());
4244

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

0 commit comments

Comments
 (0)