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

Function startClockLogging

src/helpers/exit.test.js:28–33  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

26
27// Start logging and stub `process.exit()` and `setTimeout()`
28export const startClockLogging = (opts) => {
29 const clock = fakeTimers.install({ toFake: ['setTimeout'] })
30 const stopLogging = startExitLogging(opts)
31 const stopLoggingA = stopClockLogging.bind(undefined, stopLogging, clock)
32 return { clock, stopLogging: stopLoggingA }
33}
34
35const stopClockLogging = (stopLogging, clock) => {
36 stopLogging()

Callers 1

exit.test.jsFile · 0.90

Calls 1

startExitLoggingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…