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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 12:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 12:08:47 +0300
commit66d4203791a01fdedf668a78818a229ea2c07aad (patch)
tree374fc9f6c5e709cf6ab48e257e6bfe4a504d6bbb /jest.config.js
parenta496f41f60e12a0a5c31482b7594ad547e0ade42 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js
index d07c034e88e..fe05141dfd7 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -55,6 +55,14 @@ if (IS_EE) {
collectCoverageFrom.push(rootDirEE.replace('$1', '/**/*.{js,vue}'));
}
+const coverageDirectory = () => {
+ if (process.env.CI_NODE_INDEX && process.env.CI_NODE_TOTAL) {
+ return `<rootDir>/coverage-frontend/jest-${process.env.CI_NODE_INDEX}-${process.env.CI_NODE_TOTAL}`;
+ }
+
+ return '<rootDir>/coverage-frontend/';
+};
+
// eslint-disable-next-line import/no-commonjs
module.exports = {
clearMocks: true,
@@ -62,7 +70,7 @@ module.exports = {
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper,
collectCoverageFrom,
- coverageDirectory: '<rootDir>/coverage-frontend/',
+ coverageDirectory: coverageDirectory(),
coverageReporters: ['json', 'lcov', 'text-summary', 'clover'],
cacheDirectory: '<rootDir>/tmp/cache/jest',
modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'],