File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/@vue/cli-plugin-unit-jest Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ module.exports = api => {
19
19
] ,
20
20
'transform' : {
21
21
// process *.vue files with vue-jest
22
- '^.+\\.vue$' : 'vue-jest'
22
+ '^.+\\.vue$' : 'vue-jest' ,
23
+ '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$' : 'jest-transform-stub'
23
24
} ,
24
25
// support the same @ -> src alias mapping in source code
25
26
'moduleNameMapper' : {
@@ -40,7 +41,8 @@ module.exports = api => {
40
41
devDependencies : {
41
42
'babel-jest' : '^22.0.4' ,
42
43
// this is for now necessary to force babel-jest and vue-jest to use babel 7
43
- 'babel-core' : '^7.0.0-0'
44
+ 'babel-core' : '^7.0.0-0' ,
45
+ 'jest-transform-stub' : '^1.0.0'
44
46
}
45
47
} )
46
48
} else {
@@ -55,7 +57,8 @@ module.exports = api => {
55
57
api . extendPackage ( {
56
58
devDependencies : {
57
59
// this is for now necessary to force ts-jest and vue-jest to use babel 7
58
- 'babel-core' : '^7.0.0-0'
60
+ 'babel-core' : '^7.0.0-0' ,
61
+ 'jest-transform-stub' : '^1.0.0'
59
62
}
60
63
} )
61
64
}
Original file line number Diff line number Diff line change 30
30
"devDependencies" : {
31
31
"@vue/test-utils" : " ^1.0.0-beta.10" ,
32
32
"babel-jest" : " ^22.0.4" ,
33
- "ts-jest" : " ^22.0.1"
33
+ "ts-jest" : " ^22.0.1" ,
34
+ "jest-transform-stub" : " ^1.0.0"
34
35
}
35
36
}
You can’t perform that action at this time.
0 commit comments