GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: improve test coverage of lib/dns · nodejs/node@b8cdd15

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-dns.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-dns.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dns.js
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,14 @@ assert.throws(() => dns.lookup('nodejs.org', 4), {
239239
name: 'TypeError'
240240
});
241241

242+
assert.throws(() => dns.lookup('', {
243+
family: 'nodejs.org',
244+
hints: dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL,
245+
}), {
246+
code: 'ERR_INVALID_ARG_TYPE',
247+
name: 'TypeError'
248+
});
249+
242250
dns.lookup('', { family: 4, hints: 0 }, common.mustCall());
243251

244252
dns.lookup('', {
@@ -264,6 +272,16 @@ dns.lookup('', {
264272
hints: dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL
265273
}, common.mustCall());
266274

275+
dns.lookup('', {
276+
hints: dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL,
277+
family: 'IPv4'
278+
}, common.mustCall());
279+
280+
dns.lookup('', {
281+
hints: dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL,
282+
family: 'IPv6'
283+
}, common.mustCall());
284+
267285
(async function() {
268286
await dnsPromises.lookup('', { family: 4, hints: 0 });
269287
await dnsPromises.lookup('', { family: 6, hints: dns.ADDRCONFIG });

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.