Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initializeRunner({ testFileNamePattern, testNamePattern }) {
// @ts-ignore
this.runner = new Runner(
{
rootPath: this.rootPath,
pathToJest: this.pathToJest,
localJestMajorVersion: this.localJestMajorVersion,
pathToConfig: getConfigFilePath(this.rootPath)
},
{
testFileNamePattern,
testNamePattern,
createProcess
}
);
this.runner
.on("executableJSON", (data: JestTotalResults) => {
const results = this.reconciler.updateFileWithJestStatus(data);
private startRunner() {
this.stopResolveCallback = null
let exited = false
const options = {
noColor: true,
shell: platform() === 'win32',
}
this.runner = new Runner(this.projectWorkspace, options)
this.restoreJestEvents()
this.runner.start(this.watchMode !== WatchMode.None, this.watchMode === WatchMode.WatchAll)
this.runner.on('debuggerProcessExit', () => {
if (!exited) {
exited = true
if (--this.keepAliveCounter > 0) {
this.runner.removeAllListeners()
this.startRunner()
} else {
if (this.onExitCallback) {
this.onExitCallback(this)
}
if (this.stopResolveCallback) {