File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 20
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
22
22
'use strict' ;
23
- require ( '../common' ) ;
23
+ const common = require ( '../common' ) ;
24
24
const assert = require ( 'assert' ) ;
25
25
const net = require ( 'net' ) ;
26
26
@@ -36,17 +36,17 @@ const server = net.createServer(function(socket) {
36
36
} ) ;
37
37
} ) ;
38
38
39
- server . listen ( 0 , function ( ) {
39
+ server . listen ( 0 , common . mustCall ( function ( ) {
40
40
const client = net . connect ( this . address ( ) . port ) ;
41
41
42
- client . on ( 'finish' , function ( ) {
42
+ client . on ( 'finish' , common . mustCall ( ( ) => {
43
43
assert . strictEqual ( client . bufferSize , 0 ) ;
44
- } ) ;
44
+ } ) ) ;
45
45
46
46
for ( let i = 1 ; i < iter ; i ++ ) {
47
47
client . write ( 'a' ) ;
48
48
assert . strictEqual ( client . bufferSize , i ) ;
49
49
}
50
50
51
51
client . end ( ) ;
52
- } ) ;
52
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments