From e1a55e76b4eefa657232f3882d39dbc407ced1e7 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 10 Mar 2019 10:48:57 -0400 Subject: [PATCH] test: fix syntax error in test-dns-idna2008.js when failing Fixes a bug I introduced in 961322178d69325a46dbcbaea1da818fff12c45a 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 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Ben Noordhuis --- test/internet/test-dns-idna2008.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js index 2113dd74b4b5d5..a8d7a3722357ac 100644 --- a/test/internet/test-dns-idna2008.js +++ b/test/internet/test-dns-idna2008.js @@ -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);