Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
});
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);
}
});
if (process.env.NODE_ENV == null) {
process.env.NODE_ENV = 'test'
}
require('jest-cli/build/cli').run()
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);
}
});