Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
});
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);
}
});