diff options
author | Refael Ackermann <refack@gmail.com> | 2019-03-10 10:48:57 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-03-12 11:11:38 -0400 |
commit | f77555f792e8515192d6fe973d7c4e1532da9d5c (patch) | |
tree | 58772acafa6f52446799389b596ff70647c1d603 /test | |
parent | f9ddbb6b2f2ff61bb62a4ee8a8819d561322c9e8 (diff) | |
download | android-node-v8-f77555f792e8515192d6fe973d7c4e1532da9d5c.tar.gz android-node-v8-f77555f792e8515192d6fe973d7c4e1532da9d5c.tar.bz2 android-node-v8-f77555f792e8515192d6fe973d7c4e1532da9d5c.zip |
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 <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>
Diffstat (limited to 'test')
-rw-r--r-- | test/internet/test-dns-idna2008.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js index 2113dd74b4..a8d7a37223 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); |