diff --git a/test/parallel/test-dns-lookupService.js b/test/parallel/test-dns-lookupService.js index 92fce6cbd3f189..f78e98766063f7 100644 --- a/test/parallel/test-dns-lookupService.js +++ b/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' + } +);