Skip to content
Permalink
Browse files

test: increase coverage in lib/internal/dns/promises.js

Add a test for the only uncovered code in lib/internal/dns/promises.js.

PR-URL: #27330
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information...
Trott committed Apr 21, 2019
1 parent 62c7b2e commit eac8f50ca664186d099c03dcac71a22fde89671f
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/parallel/test-dns-lookupService.js
@@ -18,3 +18,12 @@ assert.throws(
syscall: 'getnameinfo'
}
);

assert.rejects(
dns.promises.lookupService('127.0.0.1', 80),
{
code: 'ENOENT',
message: 'getnameinfo ENOENT 127.0.0.1',
syscall: 'getnameinfo'
}
);

0 comments on commit eac8f50

Please sign in to comment.
You can’t perform that action at this time.