diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-31 09:08:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-31 09:08:17 +0000 |
commit | dcbe65b8b6d3be931c10a823d1271318f70b1507 (patch) | |
tree | bd4da373dd9dc1d4ad8605960ea02f46198d8356 /jest.config.base.js | |
parent | a9f214d42107c847fcc8fb2a5dff78ba17363e41 (diff) | |
download | gitlab-ce-dcbe65b8b6d3be931c10a823d1271318f70b1507.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.base.js')
-rw-r--r-- | jest.config.base.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jest.config.base.js b/jest.config.base.js index b8df8684f6d..8fbcc99a954 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -60,6 +60,7 @@ module.exports = (path, options = {}) => { 'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json', '^spec/test_constants$': '<rootDir>/spec/frontend/__helpers__/test_constants', '^jest/(.*)$': '<rootDir>/spec/frontend/$1', + '^any_jest/(.*)$': '<rootDir>/spec/frontend/$1', '^jquery$': '<rootDir>/node_modules/jquery/dist/jquery.slim.js', ...extModuleNameMapper, }; @@ -68,11 +69,13 @@ module.exports = (path, options = {}) => { if (IS_EE) { const rootDirEE = '<rootDir>/ee/app/assets/javascripts$1'; + const specDirEE = '<rootDir>/ee/spec/frontend/$1'; Object.assign(moduleNameMapper, { '^ee(/.*)$': rootDirEE, '^ee_component(/.*)$': rootDirEE, '^ee_else_ce(/.*)$': rootDirEE, - '^ee_jest/(.*)$': '<rootDir>/ee/spec/frontend/$1', + '^ee_jest/(.*)$': specDirEE, + '^any_jest/(.*)$': specDirEE, '^any_else_ce(/.*)$': rootDirEE, '^jh_else_ee(/.*)$': rootDirEE, [TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures-ee$1', @@ -84,10 +87,12 @@ module.exports = (path, options = {}) => { if (IS_JH) { const rootDirJH = '<rootDir>/jh/app/assets/javascripts$1'; + const specDirJH = '<rootDir>/jh/spec/frontend/$1'; Object.assign(moduleNameMapper, { '^jh(/.*)$': rootDirJH, '^jh_component(/.*)$': rootDirJH, - '^jh_jest/(.*)$': '<rootDir>/jh/spec/frontend/$1', + '^jh_jest/(.*)$': specDirJH, + '^any_jest/(.*)$': specDirJH, // jh path alias https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74305#note_732793956 '^jh_else_ce(/.*)$': rootDirJH, '^jh_else_ee(/.*)$': rootDirJH, |