MCPcopy Create free account
hub / github.com/nodejs/node / testNextTick

Function testNextTick

test/async-hooks/test-destroy-not-blocked.js:29–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}).enable();
28
29function testNextTick() {
30 assert.strictEqual(activeId, -1);
31 const res = new AsyncResource(resType);
32 assert.strictEqual(activeId, res.asyncId());
33 res.emitDestroy();
34 // nextTick has higher prio than emit destroy
35 process.nextTick(common.mustCall(() =>
36 assert.strictEqual(activeId, res.asyncId())),
37 );
38}
39
40function testQueueMicrotask() {
41 assert.strictEqual(activeId, -1);

Callers 1

Calls 2

asyncIdMethod · 0.95
emitDestroyMethod · 0.95

Tested by

no test coverage detected