/** * Module initialization * Called after being loaded by Modules * * @async * @returns {!string} The name of the module * @memberof Tests */ async init() { this.henri.pen.info('tests', 'running tests'); const options = [ '--testPathPattern=/test/', '--detectOpenHandles', '--passWithNoTests', // '--coverage', // '--collectCoverageFrom=["app/**/**/*.js", "!app/views/**/*.js", "!app/routes.js"]', ]; if (!this.initialized) { this.henri.pen.info('tests', 'silent first run...'); options.push('--silent'); this.initialized = true; } await runJest.run(options); return this.name; }
/** * Module initialization * Called after being loaded by Modules * * @async * @returns {!string} The name of the module * @memberof Tests */ async init() { this.henri.pen.info('tests', 'running tests'); const options = [ '--testPathPattern=/test/', '--detectOpenHandles', '--passWithNoTests', // '--coverage', // '--collectCoverageFrom=["app/**/**/*.js", "!app/views/**/*.js", "!app/routes.js"]', ]; if (!this.initialized) { this.henri.pen.info('tests', 'silent first run...'); options.push('--silent'); this.initialized = true; } await runJest.run(options); return this.name; }