1
1
'use strict' ;
2
- var common = require ( '../common' ) ;
3
- var assert = require ( 'assert' ) ;
2
+ const common = require ( '../common' ) ;
3
+ const assert = require ( 'assert' ) ;
4
4
5
5
if ( ! common . hasCrypto ) {
6
6
common . skip ( 'missing crypto' ) ;
7
7
process . exit ( ) ;
8
8
}
9
- var tls = require ( 'tls' ) ;
9
+ const tls = require ( 'tls' ) ;
10
10
11
- var fs = require ( 'fs' ) ;
12
- var key = fs . readFileSync ( common . fixturesDir + '/keys/agent2-key.pem' ) ;
13
- var cert = fs . readFileSync ( common . fixturesDir + '/keys/agent2-cert.pem' ) ;
11
+ const fs = require ( 'fs' ) ;
12
+ const key = fs . readFileSync ( common . fixturesDir + '/keys/agent2-key.pem' ) ;
13
+ const cert = fs . readFileSync ( common . fixturesDir + '/keys/agent2-cert.pem' ) ;
14
14
15
15
var ntests = 0 ;
16
16
var nsuccess = 0 ;
@@ -45,12 +45,12 @@ function test(size, type, name, next) {
45
45
conn . end ( ) ;
46
46
} ) ;
47
47
48
- server . on ( 'close' , function ( err ) {
48
+ server . on ( 'close' , common . mustCall ( function ( err ) {
49
49
assert ( ! err ) ;
50
50
if ( next ) next ( ) ;
51
- } ) ;
51
+ } ) ) ;
52
52
53
- server . listen ( 0 , '127.0.0.1' , function ( ) {
53
+ server . listen ( 0 , '127.0.0.1' , common . mustCall ( function ( ) {
54
54
var client = tls . connect ( {
55
55
port : this . address ( ) . port ,
56
56
rejectUnauthorized : false
@@ -62,7 +62,7 @@ function test(size, type, name, next) {
62
62
nsuccess ++ ;
63
63
server . close ( ) ;
64
64
} ) ;
65
- } ) ;
65
+ } ) ) ;
66
66
}
67
67
68
68
function testNOT_PFS ( ) {
0 commit comments