Skip to content

Commit 05576cf

Browse files
committed
Move jest config to separate file
1 parent fb0ba79 commit 05576cf

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

jest.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
moduleDirectories: [
3+
'node_modules',
4+
'src'
5+
],
6+
moduleFileExtensions: [
7+
'js',
8+
'vue'
9+
],
10+
coverageDirectory: './coverage',
11+
collectCoverageFrom: [
12+
'**/src/**/*.js',
13+
'!**/tests/__tests__/**',
14+
'!**/node_modules/**'
15+
],
16+
testPathIgnorePatterns: [
17+
'/node_modules/',
18+
'<rootDir>/npm/',
19+
'<rootDir>/tests/__tests__/components/'
20+
],
21+
transform: {
22+
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
23+
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
24+
},
25+
snapshotSerializers: [
26+
'<rootDir>/node_modules/jest-serializer-vue'
27+
]
28+
}

package.json

-28
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,5 @@
5858
"vue-jest": "^3.0.2",
5959
"vue-router": "^3.0.2",
6060
"vuex": "^3.0.1"
61-
},
62-
"jest": {
63-
"moduleDirectories": [
64-
"node_modules",
65-
"src"
66-
],
67-
"moduleFileExtensions": [
68-
"js",
69-
"vue"
70-
],
71-
"coverageDirectory": "./coverage",
72-
"collectCoverageFrom": [
73-
"**/src/**/*.js",
74-
"!**/tests/__tests__/**",
75-
"!**/node_modules/**"
76-
],
77-
"testPathIgnorePatterns": [
78-
"/node_modules/",
79-
"<rootDir>/npm/",
80-
"<rootDir>/tests/__tests__/components/"
81-
],
82-
"transform": {
83-
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
84-
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
85-
},
86-
"snapshotSerializers": [
87-
"<rootDir>/node_modules/jest-serializer-vue"
88-
]
8961
}
9062
}

0 commit comments

Comments
 (0)