summaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 09:07:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-20 09:07:57 +0000
commit7881eb30eaa8b01dbcfe87faa09927c75c7d6e45 (patch)
tree298bc8d2c62b2f2c29cb8ecbcf3de3eaaa6466d9 /jest.config.js
parent64b66e0cb6d1bfd27abf24e06653f00bddb60597 (diff)
downloadgitlab-ce-7881eb30eaa8b01dbcfe87faa09927c75c7d6e45.tar.gz
Add latest changes from gitlab-org/gitlab@12-6-stable-ee
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js
index 3f9dc3fe213..59e09c85b5a 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,14 +49,17 @@ if (IS_EE) {
'^ee_component(/.*)$': rootDirEE,
'^ee_else_ce(/.*)$': rootDirEE,
});
+
+ collectCoverageFrom.push(rootDirEE.replace('$1', '/**/*.{js,vue}'));
}
// eslint-disable-next-line import/no-commonjs
module.exports = {
+ clearMocks: true,
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',