mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
2ffdf75b6e
commit
b593781009
177 changed files with 2923 additions and 7690 deletions
|
@ -29,8 +29,15 @@
|
|||
//
|
||||
// See all cli options in https://facebook.github.io/jest/docs/cli.html
|
||||
|
||||
var resolve = require('path').resolve;
|
||||
process.argv.push('--config', resolve(__dirname, '../src/dev/jest/config.js'));
|
||||
if (process.argv.indexOf('--config') === -1) {
|
||||
// append correct jest.config if none is provided
|
||||
var configPath = require('path').resolve(__dirname, '../jest.config.oss.js');
|
||||
process.argv.push('--config', configPath);
|
||||
console.log('Running Jest with --config', configPath);
|
||||
}
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/dev/jest/cli');
|
||||
if (process.env.NODE_ENV == null) {
|
||||
process.env.NODE_ENV = 'test';
|
||||
}
|
||||
|
||||
require('jest').run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue