MCPcopy Create free account
hub / github.com/ehmicky/log-process-errors / startProcessLogging

Function startProcessLogging

src/helpers/exit.test.js:11–20  ·  view source on GitHub ↗
(eventName, opts)

Source from the content-addressed store, hash-verified

9// Start logging and stub `process.exit()`, while a specific process event
10// handler is being used
11export const startProcessLogging = (eventName, opts) => {
12 const processHandler = setProcessEvent(eventName)
13 const stopLogging = startExitLogging(opts)
14 return stopProcessLogging.bind(
15 undefined,
16 eventName,
17 stopLogging,
18 processHandler,
19 )
20}
21
22const stopProcessLogging = (eventName, stopLogging, processHandler) => {
23 stopLogging()

Callers 1

exit.test.jsFile · 0.90

Calls 2

setProcessEventFunction · 0.90
startExitLoggingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…