21
21
22
22
'use strict' ;
23
23
const common = require ( '../common' ) ;
24
- const assert = require ( 'assert' ) ;
25
24
26
25
if ( ! common . hasCrypto ) {
27
26
common . skip ( 'missing crypto' ) ;
28
27
return ;
29
28
}
30
- const https = require ( 'https' ) ;
31
29
32
- const tls = require ( 'tls ' ) ;
30
+ const assert = require ( 'assert ' ) ;
33
31
const fs = require ( 'fs' ) ;
32
+ const https = require ( 'https' ) ;
33
+ const tls = require ( 'tls' ) ;
34
34
35
35
const tests = [ ] ;
36
36
@@ -69,7 +69,7 @@ test(function serverTimeout(cb) {
69
69
https . get ( {
70
70
port : this . address ( ) . port ,
71
71
rejectUnauthorized : false
72
- } ) . on ( 'error' , common . noop ) ;
72
+ } ) . on ( 'error' , common . mustCall ( ) ) ;
73
73
} ) ) ;
74
74
} ) ;
75
75
@@ -90,7 +90,7 @@ test(function serverRequestTimeout(cb) {
90
90
method : 'POST' ,
91
91
rejectUnauthorized : false
92
92
} ) ;
93
- req . on ( 'error' , common . noop ) ;
93
+ req . on ( 'error' , common . mustCall ( ) ) ;
94
94
req . write ( 'Hello' ) ;
95
95
// req is in progress
96
96
} ) ;
@@ -111,7 +111,7 @@ test(function serverResponseTimeout(cb) {
111
111
https . get ( {
112
112
port : this . address ( ) . port ,
113
113
rejectUnauthorized : false
114
- } ) . on ( 'error' , common . noop ) ;
114
+ } ) . on ( 'error' , common . mustCall ( ) ) ;
115
115
} ) ;
116
116
} ) ;
117
117
@@ -131,7 +131,7 @@ test(function serverRequestNotTimeoutAfterEnd(cb) {
131
131
https . get ( {
132
132
port : this . address ( ) . port ,
133
133
rejectUnauthorized : false
134
- } ) . on ( 'error' , common . noop ) ;
134
+ } ) . on ( 'error' , common . mustCall ( ) ) ;
135
135
} ) ;
136
136
} ) ;
137
137
0 commit comments