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

Function terminationHandler

lib/internal/test_runner/harness.js:315–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313 };
314
315 const terminationHandler = async () => {
316 const runningTests = findRunningTests(root);
317 if (runningTests.length > 0) {
318 root.reporter.interrupted(runningTests);
319 // Allow the reporter stream to process the interrupted event
320 await new Promise((resolve) => setImmediate(resolve));
321 }
322 await exitHandler(true);
323 process.exit();
324 };
325
326 process.on('uncaughtException', exceptionHandler);
327 process.on('unhandledRejection', rejectionHandler);

Callers

nothing calls this directly

Calls 5

findRunningTestsFunction · 0.85
exitHandlerFunction · 0.85
interruptedMethod · 0.80
setImmediateFunction · 0.50
exitMethod · 0.45

Tested by

no test coverage detected