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

Function onexit

test/async-hooks/test-querywrap.js:27–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25process.on('exit', onexit);
26
27function onexit() {
28 hooks.disable();
29 hooks.sanityCheck('QUERYWRAP');
30
31 const as = hooks.activitiesOfTypes('QUERYWRAP');
32 assert.strictEqual(as.length, 1);
33 const a = as[0];
34
35 assert.strictEqual(a.type, 'QUERYWRAP');
36 assert.strictEqual(typeof a.uid, 'number');
37 assert.strictEqual(typeof a.triggerAsyncId, 'number');
38 checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
39 'when process exits');
40}

Callers

nothing calls this directly

Calls 3

sanityCheckMethod · 0.80
activitiesOfTypesMethod · 0.80
disableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…