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
|
@ -11,11 +11,11 @@ hooks.enable();
|
|||
|
||||
const rootAsyncId = async_hooks.executionAsyncId();
|
||||
|
||||
queueMicrotask(common.mustCall(function() {
|
||||
queueMicrotask(common.mustCall(() => {
|
||||
assert.strictEqual(async_hooks.triggerAsyncId(), rootAsyncId);
|
||||
}));
|
||||
|
||||
process.on('exit', function() {
|
||||
process.on('exit', () => {
|
||||
hooks.sanityCheck();
|
||||
|
||||
const as = hooks.activitiesOfTypes('Microtask');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue