summaryrefslogtreecommitdiff
path: root/jest.config.base.js
diff options
context:
space:
mode:
Diffstat (limited to 'jest.config.base.js')
-rw-r--r--jest.config.base.js9
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,