summaryrefslogtreecommitdiff
path: root/jest.config.base.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-25 06:09:20 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-25 06:09:20 +0000
commit12ad81d649c654392fa0aa3640b0d194f3deff2a (patch)
tree32ecefa7f0e2ba09e5925d2939fefe3682635c47 /jest.config.base.js
parentaf9ff2b12c0fb45073592aa63d6ccbf565e88edc (diff)
downloadgitlab-ce-12ad81d649c654392fa0aa3640b0d194f3deff2a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.base.js')
-rw-r--r--jest.config.base.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/jest.config.base.js b/jest.config.base.js
index 9f611775776..939c05985f5 100644
--- a/jest.config.base.js
+++ b/jest.config.base.js
@@ -30,6 +30,8 @@ module.exports = path => {
testMatch = testMatch.map(path => path.replace('_spec.js', ''));
}
+ const TEST_FIXTURES_PATTERN = 'test_fixtures(/.*)$';
+
const moduleNameMapper = {
'^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
'^ee_component(/.*)$':
@@ -38,12 +40,12 @@ module.exports = path => {
'^ee_else_ce(/.*)$': '<rootDir>/app/assets/javascripts$1',
'^helpers(/.*)$': '<rootDir>/spec/frontend/helpers$1',
'^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
+ [TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures$1',
'\\.(jpg|jpeg|png|svg|css)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
'^spec/test_constants$': '<rootDir>/spec/frontend/helpers/test_constants',
'^jest/(.*)$': '<rootDir>/spec/frontend/$1',
'test_helpers(/.*)$': '<rootDir>/spec/frontend_integration/test_helpers$1',
- 'test_fixtures(/.*)$': '<rootDir>/tmp/tests/frontend/fixtures$1',
};
const collectCoverageFrom = ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'];
@@ -55,7 +57,7 @@ module.exports = path => {
'^ee_component(/.*)$': rootDirEE,
'^ee_else_ce(/.*)$': rootDirEE,
'^ee_jest/(.*)$': '<rootDir>/ee/spec/frontend/$1',
- 'test_fixtures(/.*)$': '<rootDir>/tmp/tests/frontend/fixtures-ee$1',
+ [TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures-ee$1',
});
collectCoverageFrom.push(rootDirEE.replace('$1', '/**/*.{js,vue}'));
@@ -86,6 +88,7 @@ module.exports = path => {
'^.+\\.(gql|graphql)$': 'jest-transform-graphql',
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
+ '^.+\\.(md|zip|png)$': 'jest-raw-loader',
},
transformIgnorePatterns: [
'node_modules/(?!(@gitlab/ui|bootstrap-vue|three|monaco-editor|monaco-yaml)/)',