MCPcopy Index your code
hub / github.com/nodejs/node / verifyAsyncHookEnabled

Function verifyAsyncHookEnabled

test/parallel/test-inspector-async-call-stack.js:26–34  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

24}
25
26function verifyAsyncHookEnabled(message) {
27 assert.strictEqual(async_hook_fields[kTotals], 4,
28 `${async_hook_fields[kTotals]} !== 4: ${message}`);
29 const promiseHooks = getPromiseHooks();
30 assert.deepStrictEqual( // Inspector async hooks should not enable promise hooks
31 promiseHooks, emptyPromiseHooks,
32 `${message}: promise hooks ${inspect(promiseHooks)}`
33 );
34}
35
36// By default inspector async hooks should not have been installed.
37verifyAsyncHookDisabled('inspector async hook should be disabled at startup');

Calls 1

inspectFunction · 0.70

Tested by

no test coverage detected