finish test coverage for lib/internal/dns/utils.js
Add coverage to achieve 100% code coverage in tests for lib/internal/dns/utils.js
.
First commit:
dns: refactor lib/internal/dns/utils.js
* alphabetize contenst of `resolverKeys` array
* less line-wrapping for increased code clarity
Second commit:
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.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines