Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-04-03 20:58:42 +0300
committerWinnie Hellmann <winnie@gitlab.com>2019-04-05 12:14:22 +0300
commit7b4756162a6f279a86d298e3015628d3b8d14cac (patch)
treee034e3690552db69e1f082b46a65eb55661432c0 /jest.config.js
parent94e6cc52bee1a67e830bc3f18aeb57930d0815a7 (diff)
Add ee_else_ce to Jest config
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/jest.config.js b/jest.config.js
index c7518be9e96..fdbbe977f0b 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -16,10 +16,13 @@ module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js', '<rootDir>/ee/spec/frontend/**/*_spec.js'],
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: {
- '^~(.*)$': '<rootDir>/app/assets/javascripts$1',
- '^ee(.*)$': '<rootDir>/ee/app/assets/javascripts$1',
- '^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1',
- '^vendor(.*)$': '<rootDir>/vendor/assets/javascripts$1',
+ '^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
+ '^ee(/.*)$': '<rootDir>/ee/app/assets/javascripts$1',
+ '^ee_else_ce(/.*)$': IS_EE
+ ? '<rootDir>/ee/app/assets/javascripts$1'
+ : '<rootDir>/app/assets/javascripts$1',
+ '^helpers(/.*)$': '<rootDir>/spec/frontend/helpers$1',
+ '^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
'\\.(jpg|jpeg|png|svg)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
},
collectCoverageFrom: ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'],