Commit Graph

3 Commits

Author SHA1 Message Date
Antoine du Hamel
cf46746b8a
test: add trailing commas in async-hooks tests (#45549)
PR-URL: https://github.com/nodejs/node/pull/45549
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2022-11-21 18:43:47 +01:00
garygsc
b27e2408af 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>
2019-12-02 20:03:17 +05:30
Anatoli Papirovski
4d074343dd
async_hooks,process: remove internalNextTick
Instead of having mostly duplicate code in form of internalNextTick,
instead use the existing defaultAsyncTriggerIdScope with a slight
modification which allows undefined triggerAsyncId to be passed in,
which then just triggers the callback with the provided arguments.

PR-URL: https://github.com/nodejs/node/pull/19147
Refs: https://github.com/nodejs/node/issues/19104
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-08 13:23:44 +01:00