forked from boid-com/webboid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
63 lines (61 loc) · 1.77 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
process.env.VUE_CLI_BABEL_TARGET_NODE = true
process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true
module.exports = {
'globals': {
'__DEV__': true,
},
'verbose': true, // false since we want to see console.logs inside tests
'bail': false,
'testURL': 'http://localhost/',
'testEnvironment': 'jsdom',
'collectCoverage': true,
'collectCoverageFrom': [
'<rootDir>/src/**/*.{js}',
'<rootDir>/src/**/*.{vue}'
],
'coverageDirectory': '<rootDir>/test/coverage',
'coverageThreshold': {
'global': {
'branches': 50,
'functions': 50,
'lines': 50,
'statements': 50
},
},
'testMatch': [
'<rootDir>/test/*/*.*.js?(x)',
'<rootDir>/test/*.*.js?(x)'
],
'testPathIgnorePatterns': [
'<rootDir>/components/coverage/',
'<rootDir>/test/coverage/',
'<rootDir>/dist/',
'<rootDir>/node_modules/',
],
'moduleFileExtensions': ['js', 'json', 'vue'],
'moduleNameMapper': {
'^vue$': '<rootDir>/node_modules/vue/dist/vue.common.js',
'quasar': '<rootDir>/test/quasar-framework/lib/umd/quasar.mat.umd.js',
'^src/(.*)$': '<rootDir>/src/$1',
'^assets/(.*)$': '<rootDir>/src/assets/$1',
'^@/(.*)$': '<rootDir>/src/components/$1',
'^variables/(.*)$': '<rootDir>/src/themes/quasar.variables.sty/$1',
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules'
},
'resolver': null,
'transformIgnorePatterns': [
'/node_modules/',
'node_modules/core-js',
'node_modules/babel-runtime',
'node_modules/lodash',
'node_modules/vue',
'node_modules/(?!@babel\/runtime)'
],
'transform': {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
'snapshotSerializers': [
'<rootDir>/node_modules/jest-serializer-vue'
],
};