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
b3b5fc7c06
commit
f25123822e
@ -24,7 +24,7 @@ const server = http.createServer(() => {
|
|||||||
// Never respond.
|
// Never respond.
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(0, options.host, function() {
|
server.listen(0, options.host, () => {
|
||||||
doRequest();
|
doRequest();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ function doRequest() {
|
|||||||
}));
|
}));
|
||||||
req.end();
|
req.end();
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(() => {
|
||||||
req.destroy();
|
req.destroy();
|
||||||
assert.strictEqual(timeout_events, 1);
|
assert.strictEqual(timeout_events, 1);
|
||||||
// Ensure the `timeout` event fired only once.
|
// Ensure the `timeout` event fired only once.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user