Skip to content

Commit

Permalink
fix(unit-jest): handle static asset imports (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
keng0o authored and yyx990803 committed Apr 27, 2018
1 parent c2aac9e commit be3bede
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@vue/cli-plugin-unit-jest/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = api => {
],
'transform': {
// process *.vue files with vue-jest
'^.+\\.vue$': 'vue-jest'
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
},
// support the same @ -> src alias mapping in source code
'moduleNameMapper': {
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli-plugin-unit-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"execa": "^0.9.0",
"jest": "^22.4.3",
"jest-serializer-vue": "^1.0.0",
"jest-transform-stub": "^1.0.0",
"vue-jest": "^2.5.0"
},
"devDependencies": {
Expand Down

0 comments on commit be3bede

Please sign in to comment.