-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
43 lines (43 loc) · 1.05 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
42
43
module.exports = {
setupFiles: ['<rootDir>/jest.init.js'],
preset: '@vue/cli-plugin-unit-jest',
transform: {
'^.+\\.vue$': 'vue-jest',
},
moduleFileExtensions: [
'js',
'json',
'vue',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^src/(.*)$': '<rootDir>/src/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@modules/(.*)$': '<rootDir>/src/modules/$1',
'^@helpers/(.*)$': '<rootDir>/src/helpers/$1',
'^@assets/(.*)$': '<rootDir>/src/assets/$1',
},
testMatch: [
'**/src/**/*.test.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
collectCoverage: true,
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'src/**/*/*.{js,vue}',
'!src/main.js',
'!src/components/Illustrations/**',
'!src/components/index.js',
'!src/components/theme.js',
'!src/router/routes.js',
'!src/router/index.js',
'!**/node_modules/**',
],
};