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

To help you get started, we’ve selected a few jest 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 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 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);
  }
});