@@ -72,41 +72,41 @@ server.on('listening', function(){
7272Cookie : [ 'foo=bar' , 'bar=baz' , 'baz=quux' ]
7373} ,
7474agent : agent
75- } , common . mustCall ( function ( res ) {
75+ } , common . mustCall ( ( res ) => {
7676const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
7777assert . deepStrictEqual ( cookieHeaders ,
7878[ 'Cookie: foo=bar; bar=baz; baz=quux' ] ) ;
7979assert . strictEqual ( res . statusCode , 200 ) ;
8080let body = '' ;
8181res . setEncoding ( 'utf8' ) ;
82- res . on ( 'data' , function ( chunk ) { body += chunk ; } ) ;
83- res . on ( 'end' , common . mustCall ( function ( ) {
82+ res . on ( 'data' , ( chunk ) => { body += chunk ; } ) ;
83+ res . on ( 'end' , common . mustCall ( ( ) => {
8484assert . strictEqual ( body , 'The path was /hello' ) ;
8585} ) ) ;
8686} ) ) ;
8787
88- setTimeout ( common . mustCall ( function ( ) {
88+ setTimeout ( common . mustCall ( ( ) => {
8989const req = http . request ( {
9090port : server . address ( ) . port ,
9191method : 'PUT' ,
9292path : '/there' ,
9393agent : agent
94- } , common . mustCall ( function ( res ) {
94+ } , common . mustCall ( ( res ) => {
9595const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
9696assert . deepStrictEqual ( cookieHeaders , [ 'Cookie: node=awesome; ta=da' ] ) ;
9797assert . strictEqual ( res . statusCode , 200 ) ;
9898let body = '' ;
9999res . setEncoding ( 'utf8' ) ;
100- res . on ( 'data' , function ( chunk ) { body += chunk ; } ) ;
101- res . on ( 'end' , common . mustCall ( function ( ) {
100+ res . on ( 'data' , ( chunk ) => { body += chunk ; } ) ;
101+ res . on ( 'end' , common . mustCall ( ( ) => {
102102assert . strictEqual ( body , 'The path was /there' ) ;
103103} ) ) ;
104104} ) ) ;
105105req . setHeader ( 'Cookie' , [ 'node=awesome' , 'ta=da' ] ) ;
106106req . end ( ) ;
107107} ) , 1 ) ;
108108
109- setTimeout ( common . mustCall ( function ( ) {
109+ setTimeout ( common . mustCall ( ( ) => {
110110const req = http . request ( {
111111port : server . address ( ) . port ,
112112method : 'POST' ,
@@ -115,7 +115,7 @@ server.on('listening', function(){
115115[ 'Cookie' , 'def=456' ] ,
116116[ 'Cookie' , 'ghi=789' ] ] ,
117117agent : agent
118- } , common . mustCall ( function ( res ) {
118+ } , common . mustCall ( ( res ) => {
119119const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
120120assert . deepStrictEqual ( cookieHeaders ,
121121[ 'Cookie: abc=123' ,
@@ -124,8 +124,8 @@ server.on('listening', function(){
124124assert . strictEqual ( res . statusCode , 200 ) ;
125125let body = '' ;
126126res . setEncoding ( 'utf8' ) ;
127- res . on ( 'data' , function ( chunk ) { body += chunk ; } ) ;
128- res . on ( 'end' , common . mustCall ( function ( ) {
127+ res . on ( 'data' , ( chunk ) => { body += chunk ; } ) ;
128+ res . on ( 'end' , common . mustCall ( ( ) => {
129129assert . strictEqual ( body , 'The path was /world' ) ;
130130} ) ) ;
131131} ) ) ;
0 commit comments