-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
22 lines (22 loc) · 782 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module.exports = {
moduleFileExtensions: ['js', 'json', 'vue', 'ts'],
preset: 'ts-jest',
moduleDirectories: ['node_modules'],
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/components/**/*.vue', '<rootDir>/pages/*.vue'],
moduleNameMapper: {
'^.+\\.(jpg|jpeg)$': 'jest-static-stubs/jpg',
'^.+\\.(png)$': 'jest-static-stubs/png',
'^.+\\.(svg)$': 'identity-obj-proxy',
'\\.(css)$': '<rootDir>/tests/__mocks__/style.js',
'@/(.*)': '<rootDir>/app/$1',
'~/(.*)': '<rootDir>/app/$1',
'~~/(.*)': '<rootDir>/app/$1',
},
transform: {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest',
},
setupFiles: [],
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
};