diff options
Diffstat (limited to 'jest.config.base.js')
-rw-r--r-- | jest.config.base.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jest.config.base.js b/jest.config.base.js index 8943383735e..18c13293275 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -17,6 +17,9 @@ module.exports = (path, options = {}) => { moduleNameMapper: extModuleNameMapper = {}, moduleNameMapperEE: extModuleNameMapperEE = {}, moduleNameMapperJH: extModuleNameMapperJH = {}, + roots: extRoots = [], + rootsEE: extRootsEE = [], + rootsJH: extRootsJH = [], } = options; const reporters = ['default']; @@ -120,7 +123,6 @@ module.exports = (path, options = {}) => { '^jest/(.*)$': '<rootDir>/spec/frontend/$1', '^ee_else_ce_jest/(.*)$': '<rootDir>/spec/frontend/$1', '^jquery$': '<rootDir>/node_modules/jquery/dist/jquery.slim.js', - '^@sentry/browser$': '<rootDir>/app/assets/javascripts/sentry/sentry_browser_wrapper.js', '^dexie$': '<rootDir>/node_modules/dexie/dist/dexie.min.js', ...extModuleNameMapper, ...vueModuleNameMappers, @@ -267,5 +269,11 @@ module.exports = (path, options = {}) => { '<rootDir>/spec/frontend/__helpers__/html_string_serializer.js', '<rootDir>/spec/frontend/__helpers__/clean_html_element_serializer.js', ], + roots: [ + '<rootDir>/app/assets/javascripts/', + ...extRoots, + ...(IS_EE ? ['<rootDir>/ee/app/assets/javascripts/', ...extRootsEE] : []), + ...(IS_JH ? ['<rootDir>/jh/app/assets/javascripts/', ...extRootsJH] : []), + ], }; }; |