Skip to content

Commit 8848669

Browse files
committed
Add Jest through vue-cli
1 parent 6715a18 commit 8848669

File tree

6 files changed

+5495
-542
lines changed

6 files changed

+5495
-542
lines changed

jest.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
moduleFileExtensions: [
3+
'js',
4+
'jsx',
5+
'json',
6+
'vue'
7+
],
8+
transform: {
9+
'^.+\\.vue$': 'vue-jest',
10+
'^.+\\.jsx?$': 'babel-jest'
11+
},
12+
moduleNameMapper: {
13+
'^@/(.*)$': '<rootDir>/src/$1'
14+
},
15+
snapshotSerializers: [
16+
'jest-serializer-vue'
17+
]
18+
}

0 commit comments

Comments
 (0)