mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
test:jest improvements to better support our monorepo (#84848)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
6bf83fc37a
commit
504c8739de
32 changed files with 287 additions and 199 deletions
|
@ -17,29 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
// # Run Jest integration tests
|
||||
//
|
||||
// All args will be forwarded directly to Jest, e.g. to watch tests run:
|
||||
//
|
||||
// node scripts/jest_integration --watch
|
||||
//
|
||||
// or to build code coverage:
|
||||
//
|
||||
// node scripts/jest_integration --coverage
|
||||
//
|
||||
// See all cli options in https://facebook.github.io/jest/docs/cli.html
|
||||
|
||||
process.argv.push('--runInBand');
|
||||
|
||||
if (process.argv.indexOf('--config') === -1) {
|
||||
// append correct jest.config if none is provided
|
||||
var configPath = require('path').resolve(__dirname, '../jest.config.integration.js');
|
||||
process.argv.push('--config', configPath);
|
||||
console.log('Running Jest with --config', configPath);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV == null) {
|
||||
process.env.NODE_ENV = 'test';
|
||||
}
|
||||
|
||||
require('jest').run();
|
||||
require('@kbn/test').runJest('jest.config.integration.js');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue