diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 09:08:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 09:08:47 +0000 |
commit | 66d4203791a01fdedf668a78818a229ea2c07aad (patch) | |
tree | 374fc9f6c5e709cf6ab48e257e6bfe4a504d6bbb /jest.config.js | |
parent | a496f41f60e12a0a5c31482b7594ad547e0ade42 (diff) | |
download | gitlab-ce-66d4203791a01fdedf668a78818a229ea2c07aad.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 10 |
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/'], |