mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-20 14:11:11 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -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}'));
|
||||
|
Reference in New Issue
Block a user