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

Function testTimer

test/node-api/test_make_callback_recurse/test.js:134–145  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

132 }), 1);
133
134 function testTimer(id) {
135 // Make sure nextTick, setImmediate and setTimeout can all recover properly
136 // after a thrown makeCallback call.
137 const d = domain.create();
138 d.on('error', common.mustCall(function(e) {
139 assert.strictEqual(e.message, `throw from domain ${id}`);
140 }));
141 makeCallback({ domain: d }, function() {
142 throw new Error(`throw from domain ${id}`);
143 });
144 throw new Error('UNREACHABLE');
145 }
146
147 process.nextTick(common.mustCall(testTimer), 3);
148 setImmediate(common.mustCall(testTimer), 2);

Callers

nothing calls this directly

Calls 3

makeCallbackFunction · 0.50
createMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…