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:
Diffstat (limited to 'jest.config.base.js')
-rw-r--r--jest.config.base.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/jest.config.base.js b/jest.config.base.js
index 745a179af6d..5b7ab4d9276 100644
--- a/jest.config.base.js
+++ b/jest.config.base.js
@@ -1,7 +1,12 @@
const IS_EE = require('./config/helpers/is_ee_env');
const isESLint = require('./config/helpers/is_eslint');
-module.exports = (path) => {
+module.exports = (path, options = {}) => {
+ const {
+ moduleNameMapper: extModuleNameMapper = {},
+ moduleNameMapperEE: extModuleNameMapperEE = {},
+ } = options;
+
const reporters = ['default'];
// To have consistent date time parsing both in local and CI environments we set
@@ -45,8 +50,7 @@ module.exports = (path) => {
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
'^spec/test_constants$': '<rootDir>/spec/frontend/__helpers__/test_constants',
'^jest/(.*)$': '<rootDir>/spec/frontend/$1',
- '^test_helpers(/.*)$': '<rootDir>/spec/frontend_integration/test_helpers$1',
- '^ee_else_ce_test_helpers(/.*)$': '<rootDir>/spec/frontend_integration/test_helpers$1',
+ ...extModuleNameMapper,
};
const collectCoverageFrom = ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'];
@@ -57,9 +61,9 @@ module.exports = (path) => {
'^ee(/.*)$': rootDirEE,
'^ee_component(/.*)$': rootDirEE,
'^ee_else_ce(/.*)$': rootDirEE,
- '^ee_else_ce_test_helpers(/.*)$': '<rootDir>/ee/spec/frontend_integration/test_helpers$1',
'^ee_jest/(.*)$': '<rootDir>/ee/spec/frontend/$1',
[TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures-ee$1',
+ ...extModuleNameMapperEE,
});
collectCoverageFrom.push(rootDirEE.replace('$1', '/**/*.{js,vue}'));