@@ -123,15 +123,11 @@ const ports = [
123123 '4.4.4.4:53' ,
124124 '[2001:4860:4860::8888]:53' ,
125125 '103.238.225.181:666' ,
126- '[fe80::483a:5aff:fee6:1f04]:666' ,
127- '[fe80::483a:5aff:fee6:1f04]' ,
128126] ;
129127const portsExpected = [
130128 '4.4.4.4' ,
131129 '2001:4860:4860::8888' ,
132130 '103.238.225.181:666' ,
133- '[fe80::483a:5aff:fee6:1f04]:666' ,
134- 'fe80::483a:5aff:fee6:1f04' ,
135131] ;
136132dns . setServers ( ports ) ;
137133assert . deepStrictEqual ( dns . getServers ( ) , portsExpected ) ;
@@ -144,7 +140,7 @@ assert.deepStrictEqual(dns.getServers(), []);
144140 code : 'ERR_INVALID_ARG_TYPE' ,
145141 name : 'TypeError' ,
146142 message : 'The "rrtype" argument must be of type string. ' +
147- 'Received an instance of Array'
143+ 'Received an instance of Array'
148144 } ;
149145 assert . throws ( ( ) => {
150146 dns . resolve ( 'example.com' , [ ] , common . mustNotCall ( ) ) ;
@@ -158,7 +154,7 @@ assert.deepStrictEqual(dns.getServers(), []);
158154 code : 'ERR_INVALID_ARG_TYPE' ,
159155 name : 'TypeError' ,
160156 message : 'The "name" argument must be of type string. ' +
161- 'Received undefined'
157+ 'Received undefined'
162158 } ;
163159 assert . throws ( ( ) => {
164160 dnsPromises . resolve ( ) ;
@@ -349,7 +345,7 @@ assert.throws(() => {
349345 code : 'ERR_MISSING_ARGS' ,
350346 name : 'TypeError' ,
351347 message : 'The "address", "port", and "callback" arguments must be ' +
352- 'specified'
348+ 'specified'
353349 } ;
354350
355351 assert . throws ( ( ) => dns . lookupService ( '0.0.0.0' ) , err ) ;
@@ -374,7 +370,7 @@ assert.throws(() => {
374370 } , err ) ;
375371}
376372
377- [ null , undefined , 65538 , 'test' , NaN , Infinity , Symbol ( ) , 0n , true , false , '' , ( ) => { } , { } ] . forEach ( ( port ) => {
373+ [ null , undefined , 65538 , 'test' , NaN , Infinity , Symbol ( ) , 0n , true , false , '' , ( ) => { } , { } ] . forEach ( ( port ) => {
378374 const err = {
379375 code : 'ERR_SOCKET_BAD_PORT' ,
380376 name : 'RangeError'
@@ -407,7 +403,8 @@ assert.throws(() => {
407403
408404{
409405 const cases = [
410- { method : 'resolveAny' ,
406+ {
407+ method : 'resolveAny' ,
411408 answers : [
412409 { type : 'A' , address : '1.2.3.4' , ttl : 0 } ,
413410 { type : 'AAAA' , address : '::42' , ttl : 0 } ,
@@ -424,17 +421,23 @@ assert.throws(() => {
424421 expire : 1800 ,
425422 minttl : 3333333333
426423 } ,
427- ] } ,
424+ ]
425+ } ,
428426
429- { method : 'resolve4' ,
427+ {
428+ method : 'resolve4' ,
430429 options : { ttl : true } ,
431- answers : [ { type : 'A' , address : '1.2.3.4' , ttl : 0 } ] } ,
430+ answers : [ { type : 'A' , address : '1.2.3.4' , ttl : 0 } ]
431+ } ,
432432
433- { method : 'resolve6' ,
433+ {
434+ method : 'resolve6' ,
434435 options : { ttl : true } ,
435- answers : [ { type : 'AAAA' , address : '::42' , ttl : 0 } ] } ,
436+ answers : [ { type : 'AAAA' , address : '::42' , ttl : 0 } ]
437+ } ,
436438
437- { method : 'resolveSoa' ,
439+ {
440+ method : 'resolveSoa' ,
438441 answers : [
439442 {
440443 type : 'SOA' ,
@@ -446,7 +449,8 @@ assert.throws(() => {
446449 expire : 1800 ,
447450 minttl : 3333333333
448451 } ,
449- ] } ,
452+ ]
453+ } ,
450454 ] ;
451455
452456 const server = dgram . createSocket ( 'udp4' ) ;
0 commit comments