Skip to content

Commit beb2081

Browse files
committed
test: improve test coverage of dns/promises
1 parent b6b6510 commit beb2081

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/internet/test-dns.js

+12
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,18 @@ TEST(function test_resolve_failure(done) {
715715
});
716716

717717

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+
718730
let getaddrinfoCallbackCalled = false;
719731

720732
console.log(`looking up ${addresses.INET4_HOST}..`);

test/parallel/test-dns.js

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ dns.lookup('', {
274274
await dnsPromises.lookup('', {
275275
hints: dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL
276276
});
277+
await dnsPromises.lookup('', { verbatim: true });
277278
})().then(common.mustCall());
278279

279280
{

0 commit comments

Comments
 (0)