@@ -129,15 +129,11 @@ const ports = [
129129 '4.4.4.4:53' ,
130130 '[2001:4860:4860::8888]:53' ,
131131 '103.238.225.181:666' ,
132- '[fe80::483a:5aff:fee6:1f04]:666' ,
133- '[fe80::483a:5aff:fee6:1f04]' ,
134132] ;
135133const portsExpected = [
136134 '4.4.4.4' ,
137135 '2001:4860:4860::8888' ,
138136 '103.238.225.181:666' ,
139- '[fe80::483a:5aff:fee6:1f04]:666' ,
140- 'fe80::483a:5aff:fee6:1f04' ,
141137] ;
142138dns . setServers ( ports ) ;
143139assert . deepStrictEqual ( dns . getServers ( ) , portsExpected ) ;
@@ -150,7 +146,7 @@ assert.deepStrictEqual(dns.getServers(), []);
150146 code : 'ERR_INVALID_ARG_TYPE' ,
151147 name : 'TypeError' ,
152148 message : 'The "rrtype" argument must be of type string. ' +
153- 'Received an instance of Array'
149+ 'Received an instance of Array'
154150 } ;
155151 assert . throws ( ( ) => {
156152 dns . resolve ( 'example.com' , [ ] , common . mustNotCall ( ) ) ;
@@ -164,7 +160,7 @@ assert.deepStrictEqual(dns.getServers(), []);
164160 code : 'ERR_INVALID_ARG_TYPE' ,
165161 name : 'TypeError' ,
166162 message : 'The "name" argument must be of type string. ' +
167- 'Received undefined'
163+ 'Received undefined'
168164 } ;
169165 assert . throws ( ( ) => {
170166 dnsPromises . resolve ( ) ;
@@ -188,7 +184,7 @@ assert.deepStrictEqual(dns.getServers(), []);
188184 assert . throws ( ( ) => dns . lookup ( 1 , common . mustNotCall ( ) ) , errorReg ) ;
189185
190186 assert . throws ( ( ) => dns . lookup ( common . mustNotCall ( ) , common . mustNotCall ( ) ) ,
191- errorReg ) ;
187+ errorReg ) ;
192188
193189 assert . throws ( ( ) => dnsPromises . lookup ( { } ) , errorReg ) ;
194190 assert . throws ( ( ) => dnsPromises . lookup ( [ ] ) , errorReg ) ;
@@ -321,7 +317,7 @@ assert.throws(() => {
321317 code : 'ERR_INVALID_ARG_VALUE' ,
322318} ) ;
323319
324- ( async function ( ) {
320+ ( async function ( ) {
325321 await assert . rejects ( dnsPromises . lookup ( '' , { family : 4 , hints : 0 } ) , {
326322 code : 'ERR_INVALID_ARG_VALUE' ,
327323 } ) ;
@@ -355,7 +351,7 @@ assert.throws(() => {
355351 code : 'ERR_MISSING_ARGS' ,
356352 name : 'TypeError' ,
357353 message : 'The "address", "port", and "callback" arguments must be ' +
358- 'specified'
354+ 'specified'
359355 } ;
360356
361357 assert . throws ( ( ) => dns . lookupService ( '0.0.0.0' ) , err ) ;
@@ -380,7 +376,7 @@ assert.throws(() => {
380376 } , err ) ;
381377}
382378
383- [ null , undefined , 65538 , 'test' , NaN , Infinity , Symbol ( ) , 0n , true , false , '' , ( ) => { } , { } ] . forEach ( ( port ) => {
379+ [ null , undefined , 65538 , 'test' , NaN , Infinity , Symbol ( ) , 0n , true , false , '' , ( ) => { } , { } ] . forEach ( ( port ) => {
384380 const err = {
385381 code : 'ERR_SOCKET_BAD_PORT' ,
386382 name : 'RangeError'
@@ -413,7 +409,8 @@ assert.throws(() => {
413409
414410{
415411 const cases = [
416- { method : 'resolveAny' ,
412+ {
413+ method : 'resolveAny' ,
417414 answers : [
418415 { type : 'A' , address : '1.2.3.4' , ttl : 0 } ,
419416 { type : 'AAAA' , address : '::42' , ttl : 0 } ,
@@ -430,17 +427,23 @@ assert.throws(() => {
430427 expire : 1800 ,
431428 minttl : 3333333333
432429 } ,
433- ] } ,
430+ ]
431+ } ,
434432
435- { method : 'resolve4' ,
433+ {
434+ method : 'resolve4' ,
436435 options : { ttl : true } ,
437- answers : [ { type : 'A' , address : '1.2.3.4' , ttl : 0 } ] } ,
436+ answers : [ { type : 'A' , address : '1.2.3.4' , ttl : 0 } ]
437+ } ,
438438
439- { method : 'resolve6' ,
439+ {
440+ method : 'resolve6' ,
440441 options : { ttl : true } ,
441- answers : [ { type : 'AAAA' , address : '::42' , ttl : 0 } ] } ,
442+ answers : [ { type : 'AAAA' , address : '::42' , ttl : 0 } ]
443+ } ,
442444
443- { method : 'resolveSoa' ,
445+ {
446+ method : 'resolveSoa' ,
444447 answers : [
445448 {
446449 type : 'SOA' ,
@@ -452,7 +455,8 @@ assert.throws(() => {
452455 expire : 1800 ,
453456 minttl : 3333333333
454457 } ,
455- ] } ,
458+ ]
459+ } ,
456460 ] ;
457461
458462 const server = dgram . createSocket ( 'udp4' ) ;
@@ -480,7 +484,7 @@ assert.throws(() => {
480484 res = [ res ] ;
481485
482486 assert . deepStrictEqual ( res . map ( tweakEntry ) ,
483- cases [ 0 ] . answers . map ( tweakEntry ) ) ;
487+ cases [ 0 ] . answers . map ( tweakEntry ) ) ;
484488 }
485489
486490 function tweakEntry ( r ) {
0 commit comments