mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05: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
9e38fc6757
commit
1962c7c7b3
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