test: convert anonymous function to arrow function

PR-URL: https://github.com/nodejs/node/pull/39604
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
This commit is contained in:
Himadri Ganguly authored and Danielle Adams committed 2021-08-16 16:34:51 -04:00
1 parent 9e38fc6757
commit 1962c7c7b3
1 file changed
+2 -2
+2 -2
View File
@@ -29,7 +29,7 @@ const http = require('http');
res.end();
}));
server.listen(0, common.mustCall(function() {
server.listen(0, common.mustCall(() => {
http.get({ port: server.address().port }, common.mustCall((res) => {
assert.strictEqual(res.headers.test, '1');
assert.strictEqual(res.headers.test2, '2');
@@ -51,7 +51,7 @@ const http = require('http');
res.end();
}));
server.listen(0, common.mustCall(function() {
server.listen(0, common.mustCall(() => {
http.get({ port: server.address().port }, common.mustCall((res) => {
res.resume().on('end', common.mustCall(() => {
server.close();