diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-06 09:19:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-06 09:19:30 +0300 |
commit | c5d8b7e6909eb0478c4b2165689004051cdc7ac5 (patch) | |
tree | ad3366728bb559feaa889434d9de3b560fc1e636 /jest.config.base.js | |
parent | 975e98bc4b507e8d11e116dad72e0a3f2ecf7a88 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'jest.config.base.js')
-rw-r--r-- | jest.config.base.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/jest.config.base.js b/jest.config.base.js index 08ee2d87a60..8c063e7173f 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -88,6 +88,9 @@ module.exports = (path, options = {}) => { } const TEST_FIXTURES_PATTERN = 'test_fixtures(/.*)$'; + const TEST_FIXTURES_HOME = '/tmp/tests/frontend/fixtures'; + const TEST_FIXTURES_HOME_EE = '/tmp/tests/frontend/fixtures-ee'; + const TEST_FIXTURES_RAW_LOADER_PATTERN = `${TEST_FIXTURES_HOME}.*\\.html$`; const moduleNameMapper = { '^~(/.*)\\?(worker|raw)$': '<rootDir>/app/assets/javascripts$1', @@ -103,7 +106,7 @@ 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>/tmp/tests/frontend/fixtures$1', + [TEST_FIXTURES_PATTERN]: `<rootDir>${TEST_FIXTURES_HOME}$1`, '^test_fixtures_static(/.*)$': '<rootDir>/spec/frontend/fixtures/static$1', '\\.(jpg|jpeg|png|svg|css)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js', '\\.svg\\?url$': '<rootDir>/spec/frontend/__mocks__/file_mock.js', @@ -132,7 +135,7 @@ module.exports = (path, options = {}) => { '^ee_else_ce_jest/(.*)$': specDirEE, '^any_else_ce(/.*)$': rootDirEE, '^jh_else_ee(/.*)$': rootDirEE, - [TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures-ee$1', + [TEST_FIXTURES_PATTERN]: `<rootDir>${TEST_FIXTURES_HOME_EE}$1`, ...extModuleNameMapperEE, }); @@ -216,7 +219,7 @@ module.exports = (path, options = {}) => { globals, clearMocks: true, testMatch, - moduleFileExtensions: ['js', 'json', 'vue', 'gql', 'graphql', 'yaml', 'yml'], + moduleFileExtensions: ['js', 'json', 'vue', 'gql', 'graphql', 'yaml', 'yml', 'html'], moduleNameMapper, collectCoverageFrom, coverageDirectory: coverageDirectory(), @@ -238,6 +241,7 @@ module.exports = (path, options = {}) => { 'spec/frontend/editor/schema/ci/yaml_tests/.+\\.(yml|yaml)$': './spec/frontend/__helpers__/yaml_transformer.js', '^.+\\.(md|zip|png|yml|yaml|sh|ps1)$': './spec/frontend/__helpers__/raw_transformer.js', + [TEST_FIXTURES_RAW_LOADER_PATTERN]: './spec/frontend/__helpers__/raw_transformer.js', }, transformIgnorePatterns: [`node_modules/(?!(${transformIgnoreNodeModules.join('|')}))`], fakeTimers: { |