dns: throw if hostname is not string or falsey
authorcjihrig <cjihrig@gmail.com>
Fri, 15 Aug 2014 14:40:09 +0000 (10:40 -0400)
committerTrevor Norris <trev.norris@gmail.com>
Wed, 20 Aug 2014 20:51:09 +0000 (13:51 -0700)
commit5086d6ef94d1ce2b67193781052be84bb6913e63
tree5565430038b87847fb31a869d47828ae4ddc3ea3
parent437c2f438335541084136480a9a5308075dd3dfd
dns: throw if hostname is not string or falsey

Fix assertion failure from poor argument parsing logic introduced in
6ea5d16. Add tests to make sure arguments are properly parsed.

Fixes: 6ea5d16 "dns: always set variable family in lookup()"
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
lib/dns.js
test/simple/test-dns.js