2021-11-09 16:10:00 -05:00
|
|
|
const fs = require('fs');
|
|
|
|
const IS_JH = require('./config/helpers/is_jh_env');
|
2020-05-15 17:08:21 -04:00
|
|
|
const baseConfig = require('./jest.config.base');
|
|
|
|
|
2021-11-09 16:10:00 -05:00
|
|
|
// TODO: Remove existsSync once jh has added jest.config.js
|
|
|
|
if (IS_JH && fs.existsSync('./jh/jest.config.js')) {
|
2021-11-10 19:12:46 -05:00
|
|
|
// We can't be explicit with eslint-disable rules because in JH it'll pass import/no-unresolved
|
|
|
|
// eslint-disable-next-line
|
2021-11-09 16:10:00 -05:00
|
|
|
module.exports = require('./jh/jest.config');
|
|
|
|
} else {
|
|
|
|
module.exports = {
|
|
|
|
...baseConfig('spec/frontend'),
|
|
|
|
};
|
|
|
|
}
|