diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /jest.config.base.js | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) | |
download | gitlab-ce-8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca.tar.gz |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'jest.config.base.js')
-rw-r--r-- | jest.config.base.js | 7 |
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)/)', |