Commit 591a24b8 authored by Rich Trott's avatar Rich Trott
Browse files

test: forbid `common.mustCall*()` in process exit handlers

`common.mustCall()` and `common.mustCallAtLeast()` need to be called
before process exit handlers to work because checks are done inside a
process exit handler. Detect if being used inside a process exit handler
and throw.

PR-URL: https://github.com/nodejs/node/pull/17453


Reviewed-By: default avatarAnatoli Papirovski <apapirovski@mac.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarKhaidi Chu <i@2333.moe>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 3549d9c2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment