summaryrefslogtreecommitdiff
path: root/jest.config.base.js
diff options
context:
space:
mode:
Diffstat (limited to 'jest.config.base.js')
-rw-r--r--jest.config.base.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jest.config.base.js b/jest.config.base.js
index d11b3a5c1e6..88ccee4d201 100644
--- a/jest.config.base.js
+++ b/jest.config.base.js
@@ -96,6 +96,10 @@ module.exports = (path, options = {}) => {
const TEST_FIXTURES_RAW_LOADER_PATTERN = `(${TEST_FIXTURES_HOME}|${TEST_FIXTURES_STATIC_HOME}).*\\.html$`;
const moduleNameMapper = {
+ [TEST_FIXTURES_PATTERN]: `<rootDir>${TEST_FIXTURES_HOME}$1`,
+ '^test_fixtures_static(/.*)$': `<rootDir>${TEST_FIXTURES_STATIC_HOME}$1`,
+ '\\.(svg|gif|png|mp4)(\\?\\w+)?$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
+ '\\.css$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
'^~(/.*)\\?(worker|raw)$': '<rootDir>/app/assets/javascripts$1',
'^(.*)\\?(worker|raw)$': '$1',
'^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
@@ -109,10 +113,6 @@ module.exports = (path, options = {}) => {
'^any_else_ce(/.*)$': '<rootDir>/app/assets/javascripts$1',
'^helpers(/.*)$': '<rootDir>/spec/frontend/__helpers__$1',
'^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
- [TEST_FIXTURES_PATTERN]: `<rootDir>${TEST_FIXTURES_HOME}$1`,
- '^test_fixtures_static(/.*)$': `<rootDir>${TEST_FIXTURES_STATIC_HOME}$1`,
- '\\.(jpg|jpeg|png|svg|css)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
- '\\.svg\\?url$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
'^public(/.*)$': '<rootDir>/public$1',
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
'^spec/test_constants$': '<rootDir>/spec/frontend/__helpers__/test_constants',