diff options
author | Rich Trott <rtrott@gmail.com> | 2019-03-29 21:31:23 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-04-01 16:58:25 -0700 |
commit | 8afab1a5a7ad1106d3199a36eb221a130d6f832b (patch) | |
tree | d9b4f7eebc4ba859b2a06a050f9da1c07f51d364 | |
parent | c88d9577bb1adb8265f48b4a0c6b80a16f448d32 (diff) | |
download | android-node-v8-8afab1a5a7ad1106d3199a36eb221a130d6f832b.tar.gz android-node-v8-8afab1a5a7ad1106d3199a36eb221a130d6f832b.tar.bz2 android-node-v8-8afab1a5a7ad1106d3199a36eb221a130d6f832b.zip |
test: add IPv6 brackets but no port to test-dns
Add a test case to test-dns to check that supply an IPv6 host with
brackets but no explicit port to `dns.setServers()` yields expected
results. This is the final bit of test coverage missing for
lib/internal/dns/utils.js.
PR-URL: https://github.com/nodejs/node/pull/27006
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-rw-r--r-- | test/parallel/test-dns.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index f974c2afa6..40e0e605cd 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -121,13 +121,15 @@ const ports = [ '4.4.4.4:53', '[2001:4860:4860::8888]:53', '103.238.225.181:666', - '[fe80::483a:5aff:fee6:1f04]:666' + '[fe80::483a:5aff:fee6:1f04]:666', + '[fe80::483a:5aff:fee6:1f04]', ]; const portsExpected = [ '4.4.4.4', '2001:4860:4860::8888', '103.238.225.181:666', - '[fe80::483a:5aff:fee6:1f04]:666' + '[fe80::483a:5aff:fee6:1f04]:666', + 'fe80::483a:5aff:fee6:1f04', ]; dns.setServers(ports); assert.deepStrictEqual(dns.getServers(), portsExpected); |