-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
46 lines (46 loc) · 1.07 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
44
45
46
module.exports = {
globals: {
__DEV__: true
},
verbose: true,
testURL: 'http://localhost/',
collectCoverage: false,
coverageDirectory: '<rootDir>/test/coverage',
collectCoverageFrom: [
'<rootDir>/src/components/**/*.vue',
'<rootDir>/src/layouts/**/*.vue',
'<rootDir>/src/pages/**/*.vue',
'<rootDir>/src/plugins/**/*.js',
'<rootDir>/src/mixins/**/*.js',
'<rootDir>/src/directives/**/*.js'
],
coverageThreshold: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50
}
},
testMatch: [
'<rootDir>/**/__tests__/**/*.spec.js'
],
moduleFileExtensions: [
'js',
'json',
'vue'
],
moduleNameMapper: {
'^vue$': '<rootDir>/node_modules/vue/dist/vue.common.js',
'^quasar$': '<rootDir>/quasar.common.js',
'^~/(.*)$': '<rootDir>/$1',
'^@/(.*)$': '<rootDir>/src/$1'
},
transform: {
'.*\\.vue$': '<rootDir>/node_modules/vue-jest',
'.*\\.js$': '<rootDir>/node_modules/babel-jest'
},
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue'
]
}