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

Function testImmediate

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

Source from the content-addressed store, hash-verified

49}
50
51function testImmediate() {
52 assert.strictEqual(activeId, -1);
53 const res = new AsyncResource(resType);
54 assert.strictEqual(activeId, res.asyncId());
55 res.emitDestroy();
56 setImmediate(common.mustCall(() =>
57 assert.strictEqual(activeId, -1)),
58 );
59}
60
61function testPromise() {
62 assert.strictEqual(activeId, -1);

Callers

nothing calls this directly

Calls 3

asyncIdMethod · 0.95
emitDestroyMethod · 0.95
setImmediateFunction · 0.50

Tested by

no test coverage detected