Skip to content

Commit

Permalink
test: increase coverage in lib/internal/dns/promises.js
Browse files Browse the repository at this point in the history
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 authored and targos committed Apr 27, 2019
1 parent 8ca110c commit 8486917
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-dns-lookupService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 8486917

Please sign in to comment.