File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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() {
168168 assert .equal (response, 1 , ' http request "response" callback was not called' );
169169});
170170
171- const server = http .createServer (function (req , res ) {
171+ const server = http .createServer ((req , res ) => {
172172 request++ ;
173173 res .end ();
174174}).listen (0 , function () {
175175 const options = {
176176 agent: null ,
177177 port: this .address ().port
178178 };
179- http .get (options, function (res ) {
179+ http .get (options, (res ) => {
180180 response++ ;
181181 res .resume ();
182182 server .close ();
@@ -191,14 +191,14 @@ This test could be greatly simplified by using `common.mustCall` like this:
191191const common = require (' ../common' );
192192const http = require (' http' );
193193
194- const server = http .createServer (common .mustCall (function (req , res ) {
194+ const server = http .createServer (common .mustCall ((req , res ) => {
195195 res .end ();
196196})).listen (0 , function () {
197197 const options = {
198198 agent: null ,
199199 port: this .address ().port
200200 };
201- http .get (options, common .mustCall (function (res ) {
201+ http .get (options, common .mustCall ((res ) => {
202202 res .resume ();
203203 server .close ();
204204 }));
You can’t perform that action at this time.
0 commit comments