@@ -72,41 +72,41 @@ server.on('listening', function() {
72
72
Cookie : [ 'foo=bar' , 'bar=baz' , 'baz=quux' ]
73
73
} ,
74
74
agent : agent
75
- } , common . mustCall ( function ( res ) {
75
+ } , common . mustCall ( ( res ) => {
76
76
const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
77
77
assert . deepStrictEqual ( cookieHeaders ,
78
78
[ 'Cookie: foo=bar; bar=baz; baz=quux' ] ) ;
79
79
assert . strictEqual ( res . statusCode , 200 ) ;
80
80
let body = '' ;
81
81
res . 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 ( ( ) => {
84
84
assert . strictEqual ( body , 'The path was /hello' ) ;
85
85
} ) ) ;
86
86
} ) ) ;
87
87
88
- setTimeout ( common . mustCall ( function ( ) {
88
+ setTimeout ( common . mustCall ( ( ) => {
89
89
const req = http . request ( {
90
90
port : server . address ( ) . port ,
91
91
method : 'PUT' ,
92
92
path : '/there' ,
93
93
agent : agent
94
- } , common . mustCall ( function ( res ) {
94
+ } , common . mustCall ( ( res ) => {
95
95
const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
96
96
assert . deepStrictEqual ( cookieHeaders , [ 'Cookie: node=awesome; ta=da' ] ) ;
97
97
assert . strictEqual ( res . statusCode , 200 ) ;
98
98
let body = '' ;
99
99
res . 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 ( ( ) => {
102
102
assert . strictEqual ( body , 'The path was /there' ) ;
103
103
} ) ) ;
104
104
} ) ) ;
105
105
req . setHeader ( 'Cookie' , [ 'node=awesome' , 'ta=da' ] ) ;
106
106
req . end ( ) ;
107
107
} ) , 1 ) ;
108
108
109
- setTimeout ( common . mustCall ( function ( ) {
109
+ setTimeout ( common . mustCall ( ( ) => {
110
110
const req = http . request ( {
111
111
port : server . address ( ) . port ,
112
112
method : 'POST' ,
@@ -115,7 +115,7 @@ server.on('listening', function() {
115
115
[ 'Cookie' , 'def=456' ] ,
116
116
[ 'Cookie' , 'ghi=789' ] ] ,
117
117
agent : agent
118
- } , common . mustCall ( function ( res ) {
118
+ } , common . mustCall ( ( res ) => {
119
119
const cookieHeaders = req . _header . match ( / ^ C o o k i e : .+ $ / img) ;
120
120
assert . deepStrictEqual ( cookieHeaders ,
121
121
[ 'Cookie: abc=123' ,
@@ -124,8 +124,8 @@ server.on('listening', function() {
124
124
assert . strictEqual ( res . statusCode , 200 ) ;
125
125
let body = '' ;
126
126
res . 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 ( ( ) => {
129
129
assert . strictEqual ( body , 'The path was /world' ) ;
130
130
} ) ) ;
131
131
} ) ) ;
0 commit comments