node/test/async-hooks
Joyee Cheung 796ff46ae6
async_hooks: add trackPromises option to createHook()
This adds a trackPromises option that allows users to completely opt
out of the promise hooks that are installed whenever an async hook is
added. For those who do not need to track promises, this avoids
the excessive hook invocation and the heavy overhead from it.

This option was previously already implemented internally to skip the
noise from promise hooks when debugging async operations via the
V8 inspector. This patch just exposes it.

PR-URL: https://github.com/nodejs/node/pull/61415
Refs: https://github.com/nodejs/node/pull/57148
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2026-01-28 19:35:56 +01:00
..
async-hooks.status test: aix: mark test-emit-on-destroyed as flaky 2026-01-20 14:35:59 +01:00
coverage.md
hook-checks.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
init-hooks.js
test-async-await.js
test-async-exec-resource-http-32060.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-exec-resource-http-agent.js
test-async-exec-resource-http.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-exec-resource-match.js
test-async-local-storage-args.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-async-await.js
test-async-local-storage-async-functions.js
test-async-local-storage-dgram.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-enable-disable.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-enter-with.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-errors.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-async-local-storage-gcable.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-http-agent.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-http.js test: ensure assertions are reached on more tests 2026-01-13 10:04:00 -03:00
test-async-local-storage-misc-stores.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-nested.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-no-mix-contexts.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-promises.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-async-local-storage-socket.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-stream-finished.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-local-storage-thenable.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-async-local-storage-tlssocket.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-async-wrap-providers.js
test-callback-error.js
test-crypto-pbkdf2.js
test-crypto-randomBytes.js
test-destroy-not-blocked.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-disable-in-init.js
test-embedder.api.async-resource-no-type.js
test-embedder.api.async-resource.js
test-embedder.api.async-resource.runInAsyncScope.js
test-emit-after-on-destroyed.js test: improve flakiness detection on stack corruption tests 2025-06-08 13:17:08 +00:00
test-emit-before-after.js
test-emit-before-on-destroyed.js
test-emit-init.js
test-enable-disable.js
test-enable-in-init.js
test-filehandle-no-reuse.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-fseventwrap.js
test-fsreqcallback-access.js
test-fsreqcallback-readFile.js
test-getaddrinforeqwrap.js
test-getnameinforeqwrap.js
test-graph.fsreq-readFile.js
test-graph.http.js
test-graph.intervals.js
test-graph.pipe.js
test-graph.pipeconnect.js
test-graph.shutdown.js
test-graph.signal.js
test-graph.statwatcher.js
test-graph.tcp.js
test-graph.timeouts.js
test-graph.tls-write-12.js
test-graph.tls-write.js
test-http-agent-handle-reuse-parallel.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-http-agent-handle-reuse-serial.js
test-httpparser-reuse.js
test-httpparser.request.js
test-httpparser.response.js
test-immediate.js
test-improper-order.js test: deflake async-hooks/test-improper-order on AIX 2025-06-10 16:43:28 +05:30
test-improper-unwind.js test: improve flakiness detection on stack corruption tests 2025-06-08 13:17:08 +00:00
test-late-hook-enable.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-net-get-connections.js
test-nexttick-default-trigger.js
test-no-assert-when-disabled.js
test-pipeconnectwrap.js
test-pipewrap.js
test-promise.chain-promise-before-init-hooks.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-promise.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-promise.promise-before-init-hooks.js test: enforce better never-settling-promise detection 2026-01-20 14:26:59 +01:00
test-querywrap.js
test-queue-microtask.js
test-shutdownwrap.js
test-signalwrap.js
test-statwatcher.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00
test-tcpwrap.js
test-timers.setInterval.js
test-timers.setTimeout.js
test-tlswrap.js
test-track-promises-default.js async_hooks: add trackPromises option to createHook() 2026-01-28 19:35:56 +01:00
test-track-promises-false-check.js async_hooks: add trackPromises option to createHook() 2026-01-28 19:35:56 +01:00
test-track-promises-false.js async_hooks: add trackPromises option to createHook() 2026-01-28 19:35:56 +01:00
test-track-promises-true.js async_hooks: add trackPromises option to createHook() 2026-01-28 19:35:56 +01:00
test-track-promises-validation.js async_hooks: add trackPromises option to createHook() 2026-01-28 19:35:56 +01:00
test-ttywrap.readstream.js
test-udpsendwrap.js
test-udpwrap.js
test-unhandled-exception-valid-ids.js
test-unhandled-rejection-context.js
test-writewrap.js
test-zlib.zlib-binding.deflate.js
testcfg.py
verify-graph.js test: ensure assertions are reachable in test/async-hooks 2025-10-09 21:57:24 +00:00