summaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 12:07:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 12:07:55 +0000
commit5e11c9b77cb1b2b77ee29359047b55807afe255d (patch)
tree40b02dead6acdcaab9cc15efc9ae4710c2ed78a8 /jest.config.js
parent97d4d926630822d0e1a638206909679c962d2f0a (diff)
downloadgitlab-ce-5e11c9b77cb1b2b77ee29359047b55807afe255d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js
index 3f9dc3fe213..79522552c6d 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -40,6 +40,8 @@ const moduleNameMapper = {
'^spec/test_constants$': '<rootDir>/spec/frontend/helpers/test_constants',
};
+const collectCoverageFrom = ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'];
+
if (IS_EE) {
const rootDirEE = '<rootDir>/ee/app/assets/javascripts$1';
Object.assign(moduleNameMapper, {
@@ -47,6 +49,8 @@ if (IS_EE) {
'^ee_component(/.*)$': rootDirEE,
'^ee_else_ce(/.*)$': rootDirEE,
});
+
+ collectCoverageFrom.push(rootDirEE.replace('$1', '/**/*.{js,vue}'));
}
// eslint-disable-next-line import/no-commonjs
@@ -54,7 +58,7 @@ module.exports = {
testMatch,
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper,
- collectCoverageFrom: ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'],
+ collectCoverageFrom,
coverageDirectory: '<rootDir>/coverage-frontend/',
coverageReporters: ['json', 'lcov', 'text-summary', 'clover'],
cacheDirectory: '<rootDir>/tmp/cache/jest',