How to use the jest-cli/build/cli/index.run function in jest-cli

To help you get started, we’ve selected a few jest-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github usehenri / henri / packages / core / src / 7.tests.js View on Github external
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;
  }