-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.js
41 lines (37 loc) · 1.15 KB
/
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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module.exports = {
verbose: true,
collectCoverage: true,
coverageReporters: ['lcov', 'text', 'text-summary'],
transformIgnorePatterns: ['<rootDir>/node_modules'],
snapshotSerializers: ['jest-serializer-vue'],
setupFiles: ['<rootDir>/.jest/setup.js'],
testMatch: [
'<rootDir>/src/components/**/**/*.test.tsx',
'<rootDir>/src/tests/**/*.test.tsx',
'<rootDir>/src/modules/**/tests/**/*.test.tsx'
],
transform: {
'.*\\.js$': 'babel-jest',
'.*\\.vue$': 'vue-jest',
'^.+\\.tsx?$': '<rootDir>/.jest/transform.js',
'.+\\.(css|scss|svg|png|jpg|jpeg|ttf|woff|woff2)$': 'jest-transform-stub'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@@/(.*)$': '<rootDir>/src/modules/$1',
'^atoms': '<rootDir>/src/components/atoms',
'^molecules': '<rootDir>/src/components/molecules',
'^organisms': '<rootDir>/src/components/organisms',
'^templates': '<rootDir>/src/components/templates',
'^vue$': 'vue/dist/vue.common.js'
},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.test.json'
}
}
}