From dcbe65b8b6d3be931c10a823d1271318f70b1507 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 31 May 2022 09:08:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- jest.config.base.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'jest.config.base.js') 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': '/fixtures/emojis$1.json', '^spec/test_constants$': '/spec/frontend/__helpers__/test_constants', '^jest/(.*)$': '/spec/frontend/$1', + '^any_jest/(.*)$': '/spec/frontend/$1', '^jquery$': '/node_modules/jquery/dist/jquery.slim.js', ...extModuleNameMapper, }; @@ -68,11 +69,13 @@ module.exports = (path, options = {}) => { if (IS_EE) { const rootDirEE = '/ee/app/assets/javascripts$1'; + const specDirEE = '/ee/spec/frontend/$1'; Object.assign(moduleNameMapper, { '^ee(/.*)$': rootDirEE, '^ee_component(/.*)$': rootDirEE, '^ee_else_ce(/.*)$': rootDirEE, - '^ee_jest/(.*)$': '/ee/spec/frontend/$1', + '^ee_jest/(.*)$': specDirEE, + '^any_jest/(.*)$': specDirEE, '^any_else_ce(/.*)$': rootDirEE, '^jh_else_ee(/.*)$': rootDirEE, [TEST_FIXTURES_PATTERN]: '/tmp/tests/frontend/fixtures-ee$1', @@ -84,10 +87,12 @@ module.exports = (path, options = {}) => { if (IS_JH) { const rootDirJH = '/jh/app/assets/javascripts$1'; + const specDirJH = '/jh/spec/frontend/$1'; Object.assign(moduleNameMapper, { '^jh(/.*)$': rootDirJH, '^jh_component(/.*)$': rootDirJH, - '^jh_jest/(.*)$': '/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, -- cgit v1.2.1