mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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:
1 parent
ac621ff5e7
commit
fcc3910dd4
1 file changed
+2
-2
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user