Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
tap.parser.on('comment', onComment)
tap.parser.on('child', onChild)
}
tap.runOnly = false
// greps are passed to children, but not the runner itself
tap.grep = []
tap.jobs = options.jobs
const env = getEnv(options)
/* istanbul ignore next */
const processDB = options.coverage && process.env.NYC_CONFIG
? new ProcessDB() : null
// run --before before everything, and --after as the very last thing
runBeforeAfter(options, env, tap, processDB)
tap.patchProcess()
// if not -Rtap, then output what the user wants.
// otherwise just dump to stdout
/* istanbul ignore next */
makeReporter(tap, options)
// need to replay the first version line, because the previous
// line will have flushed it out to stdout or the reporter already.
if (options['output-file'] !== null)
tap.pipe(fs.createWriteStream(options['output-file'])).write('TAP version 13\n')
})
// require extensions can be provided as config in package.json.
this.require = [].concat(config.require || [])
this.transforms = this.extensions.reduce((transforms, ext) => {
transforms[ext] = this._createTransform(ext)
return transforms
}, {})
this.hookRequire = config.hookRequire
this.hookRunInContext = config.hookRunInContext
this.hookRunInThisContext = config.hookRunInThisContext
this.fakeRequire = null
this.processInfo = new ProcessInfo(Object.assign({}, config._processInfo, {
directory: path.resolve(this.tempDirectory(), 'processinfo')
}))
this.hashCache = {}
}
async showProcessTree () {
const db = new ProcessDB(this.processInfo.directory)
console.log(await db.renderTree(this))
}
async writeProcessIndex () {
const db = new ProcessDB(this.processInfo.directory)
await db.writeIndex()
}