-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (26 loc) · 931 Bytes
/
jest.config.js
File metadata and controls
28 lines (26 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const reporters = ['default'];
if (process.env.JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE) {
reporters.push('jest-image-snapshot/src/outdated-snapshot-reporter.js');
}
module.exports = {
verbose: true,
moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: {
'^~helpers/(.*)$': '<rootDir>/tests/__helpers__/$1',
'^~/(.*)$': '<rootDir>/src/$1',
'^@gitlab/ui$': '<rootDir>/index.js',
'\\.(css|scss|less)$': 'identity-obj-proxy',
},
modulePathIgnorePatterns: ['cypress/integration', '.cypress_cache'],
transform: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'\\.(svg|html|md|png)$': 'jest-raw-loader',
},
transformIgnorePatterns: [
'/node_modules(?![\\\\/]bootstrap-vue[\\\\/]|(/@storybook/.*\\.vue$)|(/@gitlab/svgs/))/',
],
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
setupFilesAfterEnv: ['<rootDir>/tests/jest_setup.js'],
reporters,
};