Setup tests environment

This commit is contained in:
Alejandro Celaya
2018-06-14 19:42:42 +02:00
parent e150b35e33
commit 9ac0811200
8 changed files with 74 additions and 28 deletions

View File

@@ -15,13 +15,8 @@ process.on('unhandledRejection', err => {
// Ensure environment variables are read.
require('../config/env');
// Make tests to be matched inside tests folder
const jest = require('jest');
let argv = process.argv.slice(2);
// Watch unless on CI or in coverage mode
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
argv.push('--watch');
}
jest.run(argv);