File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -715,6 +715,18 @@ TEST(function test_resolve_failure(done) {
715
715
} ) ;
716
716
717
717
718
+ TEST ( async function test_promise_lookup_with_verbatim ( done ) {
719
+ function validateResult ( res ) {
720
+ assert . ok ( net . isIPv6 ( res . address ) ) ;
721
+ assert . strictEqual ( res . family , 6 ) ;
722
+ }
723
+
724
+ validateResult ( await dnsPromises . lookup (
725
+ addresses . INET_HOST ,
726
+ { verbatim : true } ) ) ;
727
+ done ( ) ;
728
+ } ) ;
729
+
718
730
let getaddrinfoCallbackCalled = false ;
719
731
720
732
console . log ( `looking up ${ addresses . INET4_HOST } ..` ) ;
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ dns.lookup('', {
274
274
await dnsPromises . lookup ( '' , {
275
275
hints : dns . ADDRCONFIG | dns . V4MAPPED | dns . ALL
276
276
} ) ;
277
+ await dnsPromises . lookup ( '' , { verbatim : true } ) ;
277
278
} ) ( ) . then ( common . mustCall ( ) ) ;
278
279
279
280
{
You can’t perform that action at this time.
0 commit comments