Add support for jh/jest.config.js
This commit is contained in:
parent
28cf5c88d9
commit
2fa3c81a89
|
@ -1,5 +1,13 @@
|
|||
const fs = require('fs');
|
||||
const IS_JH = require('./config/helpers/is_jh_env');
|
||||
const baseConfig = require('./jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
...baseConfig('spec/frontend'),
|
||||
};
|
||||
// TODO: Remove existsSync once jh has added jest.config.js
|
||||
if (IS_JH && fs.existsSync('./jh/jest.config.js')) {
|
||||
// eslint-disable-next-line global-require, import/no-unresolved
|
||||
module.exports = require('./jh/jest.config');
|
||||
} else {
|
||||
module.exports = {
|
||||
...baseConfig('spec/frontend'),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue