@@ -32,20 +32,20 @@ tmpdir.refresh();
3232const filename = path . join ( tmpdir . path || '/tmp' , 'big' ) ;
3333let count = 0 ;
3434
35- const server = http . createServer ( function ( req , res ) {
35+ const server = http . createServer ( ( req , res ) => {
3636 let timeoutId ;
3737 assert . strictEqual ( req . method , 'POST' ) ;
3838 req . pause ( ) ;
3939
40- setTimeout ( function ( ) {
40+ setTimeout ( ( ) => {
4141 req . resume ( ) ;
4242 } , 1000 ) ;
4343
44- req . on ( 'data' , function ( chunk ) {
44+ req . on ( 'data' , ( chunk ) => {
4545 count += chunk . length ;
4646 } ) ;
4747
48- req . on ( 'end' , function ( ) {
48+ req . on ( 'end' , ( ) => {
4949 if ( timeoutId ) {
5050 clearTimeout ( timeoutId ) ;
5151 }
@@ -55,7 +55,7 @@ const server = http.createServer(function(req, res) {
5555} ) ;
5656server . listen ( 0 ) ;
5757
58- server . on ( 'listening' , function ( ) {
58+ server . on ( 'listening' , ( ) => {
5959 common . createZeroFilledFile ( filename ) ;
6060 makeRequest ( ) ;
6161} ) ;
@@ -73,14 +73,14 @@ function makeRequest() {
7373 assert . ifError ( err ) ;
7474 } ) ) ;
7575
76- req . on ( 'response' , function ( res ) {
76+ req . on ( 'response' , ( res ) => {
7777 res . resume ( ) ;
78- res . on ( 'end' , function ( ) {
78+ res . on ( 'end' , ( ) => {
7979 server . close ( ) ;
8080 } ) ;
8181 } ) ;
8282}
8383
84- process . on ( 'exit' , function ( ) {
84+ process . on ( 'exit' , ( ) => {
8585 assert . strictEqual ( count , 1024 * 10240 ) ;
8686} ) ;
0 commit comments