File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -168,15 +168,15 @@ process.on('exit', function() {
168
168
assert .equal (response, 1 , ' http request "response" callback was not called' );
169
169
});
170
170
171
- const server = http .createServer (function (req , res ) {
171
+ const server = http .createServer ((req , res ) => {
172
172
request++ ;
173
173
res .end ();
174
174
}).listen (0 , function () {
175
175
const options = {
176
176
agent: null ,
177
177
port: this .address ().port
178
178
};
179
- http .get (options, function (res ) {
179
+ http .get (options, (res ) => {
180
180
response++ ;
181
181
res .resume ();
182
182
server .close ();
@@ -191,14 +191,14 @@ This test could be greatly simplified by using `common.mustCall` like this:
191
191
const common = require (' ../common' );
192
192
const http = require (' http' );
193
193
194
- const server = http .createServer (common .mustCall (function (req , res ) {
194
+ const server = http .createServer (common .mustCall ((req , res ) => {
195
195
res .end ();
196
196
})).listen (0 , function () {
197
197
const options = {
198
198
agent: null ,
199
199
port: this .address ().port
200
200
};
201
- http .get (options, common .mustCall (function (res ) {
201
+ http .get (options, common .mustCall ((res ) => {
202
202
res .resume ();
203
203
server .close ();
204
204
}));
You can’t perform that action at this time.
0 commit comments