diff options
author | garygsc <garygsc@gmail.com> | 2019-10-26 13:17:23 -0600 |
---|---|---|
committer | Gireesh Punathil <gpunathi@in.ibm.com> | 2019-12-02 20:03:17 +0530 |
commit | b27e2408af6683d34852221ae70b937b0f95943f (patch) | |
tree | adc4c7a9f20aa89877b350b59bbd4e04f0674985 /test/async-hooks/test-graph.pipeconnect.js | |
parent | cf3a05ae5f8c78dd837b0135f467683477ccc5bc (diff) | |
download | android-node-v8-b27e2408af6683d34852221ae70b937b0f95943f.tar.gz android-node-v8-b27e2408af6683d34852221ae70b937b0f95943f.tar.bz2 android-node-v8-b27e2408af6683d34852221ae70b937b0f95943f.zip |
test: use arrow functions in async-hooks tests
Convert all anonymous callback functions in `test/async-hooks/*.js`
to use arrow functions.
`writing-tests.md` states to use arrow functions when appropriate.
PR-URL: https://github.com/nodejs/node/pull/30137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/async-hooks/test-graph.pipeconnect.js')
-rw-r--r-- | test/async-hooks/test-graph.pipeconnect.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/async-hooks/test-graph.pipeconnect.js b/test/async-hooks/test-graph.pipeconnect.js index 03d2902c83..440ea906a1 100644 --- a/test/async-hooks/test-graph.pipeconnect.js +++ b/test/async-hooks/test-graph.pipeconnect.js @@ -12,9 +12,9 @@ tmpdir.refresh(); const hooks = initHooks(); hooks.enable(); -net.createServer(function(c) { +const server = net.createServer((c) => { c.end(); - this.close(); + server.close(); }).listen(common.PIPE, common.mustCall(onlisten)); function onlisten() { |