@@ -85,7 +85,7 @@ tape('combined', function (t) {
85
85
pull . collect ( function ( err , ary ) {
86
86
if ( err ) throw err
87
87
t . equal ( Buffer . concat ( ary ) . toString ( ) , 'HELLO WORLD' )
88
- close ( function ( ) { t . end ( ) } )
88
+ close ( t . end )
89
89
} )
90
90
)
91
91
} )
@@ -113,7 +113,7 @@ if (has_ipv6)
113
113
pull . collect ( function ( err , ary ) {
114
114
if ( err ) throw err
115
115
t . equal ( Buffer . concat ( ary ) . toString ( ) , 'HELLO WORLD' )
116
- close ( function ( ) { t . end ( ) } )
116
+ close ( t . end )
117
117
} )
118
118
)
119
119
} )
@@ -165,7 +165,7 @@ tape('net: do not listen on all addresses', function (t) {
165
165
console . log ( 'addr local scope' , addr )
166
166
combined . client ( addr , function ( err , stream ) {
167
167
t . ok ( err , 'should only listen on localhost' )
168
- close ( function ( ) { t . end ( ) } )
168
+ close ( t . end )
169
169
} )
170
170
} )
171
171
@@ -181,7 +181,7 @@ tape('net: do not crash if listen() fails', function(t) {
181
181
var close = combined . server ( echo , function ( ) { } , function ( err ) {
182
182
t . ok ( err , 'should propagate listen error up' )
183
183
t . match ( err . code , / ^ ( E N O T F O U N D | E A I _ A G A I N ) $ / , 'the error is expected' )
184
- close ( function ( ) { t . end ( ) } )
184
+ close ( ( ) => t . end ( ) )
185
185
} )
186
186
} )
187
187
@@ -220,9 +220,7 @@ tape('combined, unix', function (t) {
220
220
pull . collect ( function ( err , ary ) {
221
221
if ( err ) throw err
222
222
t . equal ( Buffer . concat ( ary ) . toString ( ) , 'HELLO WORLD' )
223
- close ( function ( ) {
224
- t . end ( )
225
- } )
223
+ close ( t . end )
226
224
} )
227
225
)
228
226
} )
@@ -234,7 +232,6 @@ tape('ws with combined', function (t) {
234
232
t . ok ( stream . address , 'has an address' )
235
233
echo ( stream )
236
234
} , null , function ( ) {
237
-
238
235
combined_ws . client ( combined_ws . stringify ( ) , function ( err , stream ) {
239
236
if ( err ) throw err
240
237
t . ok ( stream . address , 'has an address' )
@@ -249,15 +246,14 @@ tape('ws with combined', function (t) {
249
246
} ) ,
250
247
pull . collect ( function ( err , ary ) {
251
248
t . equal ( Buffer . concat ( ary ) . toString ( ) , 'HELLO WORLD' )
252
- close ( function ( ) { t . end ( ) } )
249
+ close ( t . end )
253
250
} )
254
251
)
255
252
} )
256
253
} )
257
254
} )
258
255
259
256
tape ( 'error if try to connect on wrong protocol' , function ( t ) {
260
-
261
257
t . equal ( combined_ws . parse ( combined . stringify ( ) ) , null )
262
258
263
259
combined_ws . client ( combined . stringify ( ) , function ( err , stream ) {
@@ -267,7 +263,6 @@ tape('error if try to connect on wrong protocol', function (t) {
267
263
} )
268
264
269
265
tape ( 'shs with seed' , function ( t ) {
270
-
271
266
var close = combined . server ( echo )
272
267
273
268
var seed = cl . crypto_hash_sha256 ( Buffer . from ( 'TEST SEED' ) )
@@ -288,9 +283,8 @@ tape('shs with seed', function (t) {
288
283
t . notOk ( err )
289
284
t . deepEqual ( checked , bob . publicKey )
290
285
stream . source ( true , function ( ) { } )
291
- close ( function ( ) { t . end ( ) } )
286
+ close ( t . end )
292
287
} )
293
-
294
288
} )
295
289
296
290
tape ( 'ws default port' , function ( t ) {
@@ -338,7 +332,6 @@ tape('wss with key and cert', function (t) {
338
332
var onion = Onion ( { scope : 'public' } )
339
333
340
334
tape ( 'onion plug' , function ( t ) {
341
-
342
335
// onion has no server
343
336
t . equal ( onion . stringify ( 'public' ) , null )
344
337
t . equal ( onion . stringify ( 'device' ) , null )
@@ -357,7 +350,6 @@ tape('onion plug', function (t) {
357
350
358
351
//should not return an address
359
352
t . notOk ( oshs . stringify ( ) )
360
-
361
353
t . end ( )
362
354
} )
363
355
@@ -384,7 +376,7 @@ tape('id of stream from server', function (t) {
384
376
t . equal ( addr [ 0 ] . port , 4848 )
385
377
t . deepEqual ( addr [ 1 ] , combined . parse ( combined . stringify ( ) ) [ 1 ] )
386
378
stream . source ( true , function ( ) {
387
- close ( function ( ) { t . end ( ) } )
379
+ close ( t . end )
388
380
} )
389
381
} )
390
382
} )
0 commit comments