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

Function testQueueMicrotask

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

Source from the content-addressed store, hash-verified

38}
39
40function testQueueMicrotask() {
41 assert.strictEqual(activeId, -1);
42 const res = new AsyncResource(resType);
43 assert.strictEqual(activeId, res.asyncId());
44 res.emitDestroy();
45 // queueMicrotask has higher prio than emit destroy
46 queueMicrotask(common.mustCall(() =>
47 assert.strictEqual(activeId, res.asyncId())),
48 );
49}
50
51function testImmediate() {
52 assert.strictEqual(activeId, -1);

Callers

nothing calls this directly

Calls 3

asyncIdMethod · 0.95
emitDestroyMethod · 0.95
queueMicrotaskFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…