mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
test: replace callback functions with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24432 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
518bc9679d
commit
cf7bf27325
|
|
@ -24,7 +24,7 @@ const server = http.createServer(() => {
|
|||
// Never respond.
|
||||
});
|
||||
|
||||
server.listen(0, options.host, function() {
|
||||
server.listen(0, options.host, () => {
|
||||
doRequest();
|
||||
});
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ function doRequest() {
|
|||
}));
|
||||
req.end();
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(() => {
|
||||
req.destroy();
|
||||
assert.strictEqual(timeout_events, 1);
|
||||
// Ensure the `timeout` event fired only once.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user