@@ -13,13 +13,13 @@ const dnsPromises = dns.promises;
1313let running = false ;
1414const queue = [ ] ;
1515
16- function TEST ( f ) {
16+ function test ( f ) {
1717 function next ( ) {
1818 const f = queue . shift ( ) ;
1919 if ( f ) {
2020 running = true ;
2121 console . log ( f . name ) ;
22- f ( done ) ;
22+ f ( done ) . then ( common . mustCall ( ) ) ;
2323 }
2424 }
2525
@@ -39,7 +39,7 @@ function checkWrap(req) {
3939 assert . ok ( typeof req === 'object' ) ;
4040}
4141
42- TEST ( async function test_resolve4 ( done ) {
42+ test ( async function test_resolve4 ( done ) {
4343 function validateResult ( res ) {
4444 assert . ok ( res . length > 0 ) ;
4545
@@ -60,7 +60,7 @@ TEST(async function test_resolve4(done) {
6060 checkWrap ( req ) ;
6161} ) ;
6262
63- TEST ( async function test_reverse_ipv4 ( done ) {
63+ test ( async function test_reverse_ipv4 ( done ) {
6464 function validateResult ( res ) {
6565 assert . ok ( res . length > 0 ) ;
6666
@@ -82,7 +82,7 @@ TEST(async function test_reverse_ipv4(done) {
8282 checkWrap ( req ) ;
8383} ) ;
8484
85- TEST ( async function test_lookup_ipv4_explicit ( done ) {
85+ test ( async function test_lookup_ipv4_explicit ( done ) {
8686 function validateResult ( res ) {
8787 assert . ok ( net . isIPv4 ( res . address ) ) ;
8888 assert . strictEqual ( res . family , 4 ) ;
@@ -100,7 +100,7 @@ TEST(async function test_lookup_ipv4_explicit(done) {
100100 checkWrap ( req ) ;
101101} ) ;
102102
103- TEST ( async function test_lookup_ipv4_implicit ( done ) {
103+ test ( async function test_lookup_ipv4_implicit ( done ) {
104104 function validateResult ( res ) {
105105 assert . ok ( net . isIPv4 ( res . address ) ) ;
106106 assert . strictEqual ( res . family , 4 ) ;
@@ -118,7 +118,7 @@ TEST(async function test_lookup_ipv4_implicit(done) {
118118 checkWrap ( req ) ;
119119} ) ;
120120
121- TEST ( async function test_lookup_ipv4_explicit_object ( done ) {
121+ test ( async function test_lookup_ipv4_explicit_object ( done ) {
122122 function validateResult ( res ) {
123123 assert . ok ( net . isIPv4 ( res . address ) ) ;
124124 assert . strictEqual ( res . family , 4 ) ;
@@ -136,7 +136,7 @@ TEST(async function test_lookup_ipv4_explicit_object(done) {
136136 checkWrap ( req ) ;
137137} ) ;
138138
139- TEST ( async function test_lookup_ipv4_hint_addrconfig ( done ) {
139+ test ( async function test_lookup_ipv4_hint_addrconfig ( done ) {
140140 function validateResult ( res ) {
141141 assert . ok ( net . isIPv4 ( res . address ) ) ;
142142 assert . strictEqual ( res . family , 4 ) ;
@@ -156,7 +156,7 @@ TEST(async function test_lookup_ipv4_hint_addrconfig(done) {
156156 checkWrap ( req ) ;
157157} ) ;
158158
159- TEST ( async function test_lookup_ip_ipv4 ( done ) {
159+ test ( async function test_lookup_ip_ipv4 ( done ) {
160160 function validateResult ( res ) {
161161 assert . strictEqual ( res . address , '127.0.0.1' ) ;
162162 assert . strictEqual ( res . family , 4 ) ;
@@ -173,7 +173,7 @@ TEST(async function test_lookup_ip_ipv4(done) {
173173 checkWrap ( req ) ;
174174} ) ;
175175
176- TEST ( async function test_lookup_localhost_ipv4 ( done ) {
176+ test ( async function test_lookup_localhost_ipv4 ( done ) {
177177 function validateResult ( res ) {
178178 assert . strictEqual ( res . address , '127.0.0.1' ) ;
179179 assert . strictEqual ( res . family , 4 ) ;
@@ -190,7 +190,7 @@ TEST(async function test_lookup_localhost_ipv4(done) {
190190 checkWrap ( req ) ;
191191} ) ;
192192
193- TEST ( async function test_lookup_all_ipv4 ( done ) {
193+ test ( async function test_lookup_all_ipv4 ( done ) {
194194 function validateResult ( res ) {
195195 assert . ok ( Array . isArray ( res ) ) ;
196196 assert . ok ( res . length > 0 ) ;
@@ -218,7 +218,7 @@ TEST(async function test_lookup_all_ipv4(done) {
218218 checkWrap ( req ) ;
219219} ) ;
220220
221- TEST ( async function test_lookupservice_ip_ipv4 ( done ) {
221+ test ( async function test_lookupservice_ip_ipv4 ( done ) {
222222 function validateResult ( res ) {
223223 assert . strictEqual ( typeof res . hostname , 'string' ) ;
224224 assert ( res . hostname ) ;
@@ -238,12 +238,12 @@ TEST(async function test_lookupservice_ip_ipv4(done) {
238238 checkWrap ( req ) ;
239239} ) ;
240240
241- TEST ( function test_lookupservice_ip_ipv4_promise ( done ) {
241+ test ( function test_lookupservice_ip_ipv4_promise ( done ) {
242242 util . promisify ( dns . lookupService ) ( '127.0.0.1' , 80 )
243- . then ( common . mustCall ( ( { hostname, service } ) => {
243+ . then ( ( { hostname, service } ) => {
244244 assert . strictEqual ( typeof hostname , 'string' ) ;
245245 assert ( hostname . length > 0 ) ;
246246 assert ( [ 'http' , 'www' , '80' ] . includes ( service ) ) ;
247247 done ( ) ;
248- } ) ) ;
248+ } ) . then ( common . mustCall ( ) ) ;
249249} ) ;
0 commit comments