diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-12-10 13:22:05 +0100 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-12-11 13:06:19 +0100 |
commit | ca3603de56445862b47cbc9b8eec50cbf82d71c3 (patch) | |
tree | b03a11e754642fd63f9afb5866c6b712e96a3333 /jest.config.js | |
parent | 5c4cf3b3a37a2b97ff578ce6a1296e8fc1774abc (diff) | |
download | gitlab-ce-ca3603de56445862b47cbc9b8eec50cbf82d71c3.tar.gz |
Move jest.config.js to root directory
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000000..0a7b2aedb42 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,27 @@ +/* eslint-disable filenames/match-regex */ + +const reporters = ['default']; + +if (process.env.CI) { + reporters.push([ + 'jest-junit', + { + output: './junit_jest.xml', + }, + ]); +} + +// eslint-disable-next-line import/no-commonjs +module.exports = { + testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'], + moduleNameMapper: { + '^~(.*)$': '<rootDir>/app/assets/javascripts$1', + '^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1', + }, + collectCoverageFrom: ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'], + coverageDirectory: '<rootDir>/coverage-frontend/', + coverageReporters: ['json', 'lcov', 'text-summary', 'clover'], + cacheDirectory: '<rootDir>/tmp/cache/jest', + modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'], + reporters, +}; |