MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / autoExit

Function autoExit

lib/command/utils.js:110–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108}
109
110export async function autoExit() {
111 const timeout = parseInt(process.env.CODECEPT_AUTO_EXIT_TIMEOUT, 10)
112 if (timeout === 0) return
113 const exitTimeout = timeout || 2000
114
115 const { default: container } = await import('../container.js')
116 const helpers = container.helpers()
117 if (!helpers || !Object.values(helpers).some(h => typeof h._cleanup === 'function')) return
118
119 const { default: recorder } = await import('../recorder.js')
120 await Promise.race([recorder.promise(), new Promise(resolve => setTimeout(resolve, exitTimeout))])
121 process.exit(process.exitCode || 0)
122}
123
124export const findConfigFile = testsPath => {
125 const extensions = ['js', 'ts']

Callers 1

run.jsFile · 0.90

Calls 1

helpersMethod · 0.80

Tested by

no test coverage detected