mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
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>
This commit is contained in:
parent
cf3a05ae5f
commit
b27e2408af
6 changed files with 13 additions and 13 deletions
|
@ -7,7 +7,7 @@ const fs = require('fs');
|
|||
let nestedCall = false;
|
||||
|
||||
async_hooks.createHook({
|
||||
init: common.mustCall(function() {
|
||||
init: common.mustCall(() => {
|
||||
nestedHook.disable();
|
||||
if (!nestedCall) {
|
||||
nestedCall = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue