-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
70 lines (70 loc) · 1.46 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = {
verbose: true,
// Appended to the tests names
displayName: {
name: 'eProtocole', color: 'blue',
},
// Global variables
"globals": {
"__DEV__": true
},
// Global setup
globalSetup: "<rootDir>/jest.global.setup.js",
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js'
},
moduleFileExtensions: [
'js',
'vue',
'json'
],
transform: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest'
},
// activate code coverage measurements
collectCoverage: false,
collectCoverageFrom: [
'<rootDir>/components/**/*.vue',
'<rootDir>/pages/**/*.vue',
'<rootDir>/store/**/*.js'
],
coveragePathIgnorePatterns: [
"dist", "/node_modules/"
],
// Define some specific coverage thresholds
coverageThreshold: {
"global": {
"branches": 50,
"functions": 50,
"lines": 50,
"statements": 50
},
"./components/": {
"branches": 40,
"statements": 40
},
"./pages/": {
"branches": 40,
"statements": 40
},
// "./src/reducers/**/*.js": {
// "statements": 90
// },
// "./src/api/very-important-module.js": {
// "branches": 100,
// "functions": 100,
// "lines": 100,
// "statements": 100
// }
},
// Testing in the browser vs Node.js
testEnvironment: 'jsdom',
setupFiles: [
],
setupFilesAfterEnv: [
'./jest.setup.js'
]
}