From 7148776c0a0e36381ba5feedc2076cf4bdec9e3d Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Fri, 10 Mar 2023 07:48:47 +0800 Subject: [PATCH] test: update test --- test/internet/test-dns-getDefaultResultOrder.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/internet/test-dns-getDefaultResultOrder.js b/test/internet/test-dns-getDefaultResultOrder.js index 0ba17ec29e958d..ae176f1264508b 100644 --- a/test/internet/test-dns-getDefaultResultOrder.js +++ b/test/internet/test-dns-getDefaultResultOrder.js @@ -11,3 +11,14 @@ assert.ok(dnsOrder === 'ipv4first'); dns.setDefaultResultOrder('verbatim'); dnsOrder = dns.getDefaultResultOrder(); assert.ok(dnsOrder === 'verbatim'); + +{ + (async function() { + const result = await dns.promises.lookup('localhost'); + const result1 = await dns.promises.lookup('localhost', { verbatim: true }); + assert.ok(result !== undefined); + assert.ok(result1 !== undefined); + assert.ok(result.address === result1.address); + assert.ok(result.family === result1.family); + })().then(common.mustCall()); +}