How to use the jest-cli/build/cli.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 learningequality / kolibri / packages / kolibri-tools / lib / cli.js View on Github external
if (process.env.NODE_ENV == null) {
      process.env.NODE_ENV = 'test';
    }
    let config;
    if (options.config) {
      config = path.resolve(process.cwd(), options.config);
      const configIndex = process.argv.findIndex(item => item === '--config');
      process.argv.splice(configIndex, 2);
    } else {
      config = baseConfigPath;
    }
    // Remove the 'test' command that this was invoked with
    process.argv.splice(2, 1);
    process.argv.push('--config');
    process.argv.push(config);
    require('jest-cli/build/cli').run();
  });
github vega / voyager / scripts / jest-ui.js View on Github external
compiler.plugin('done', function(compilation) {

  if (process.env.NODE_ENV == null) {
    process.env.NODE_ENV = 'test';
  }

  console.log('Compiling lib done.  Now run jest');

  const jestConf = `--config ${path.resolve(__dirname, '../config', 'jest-ui.config.json')}`;

  try {
    require('jest-cli/build/cli').run(jestConf);
  }
  catch (_) {
    require('jest/node_modules/jest-cli/build/cli').run(jestConf);
  }
});
github SeleniumHQ / selenium-ide / packages / selenium-side-runner / src / child.js View on Github external
if (process.env.NODE_ENV == null) {
  process.env.NODE_ENV = 'test'
}

require('jest-cli/build/cli').run()
github vega / voyager / scripts / jest-ui.js View on Github external
compiler.plugin('done', function(compilation) {

  if (process.env.NODE_ENV == null) {
    process.env.NODE_ENV = 'test';
  }

  const jestConf = `--config ${path.resolve(__dirname, '../config', 'jest-ui.config.json')}`;

  try {
    require('jest-cli/build/cli').run(jestConf);
  }
  catch (_) {
    require('jest/node_modules/jest-cli/build/cli').run(jestConf);
  }
});