Skip to content

Commit

Permalink
add/fix setting to run vue component test
Browse files Browse the repository at this point in the history
- enable module plugin of babel
  see: jestjs/jest#3202
- fix path to vue mapper
  • Loading branch information
Nakamura Takahiro committed Oct 10, 2017
1 parent ce2e983 commit 3c2269f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
[
"env", {
"test": {
"useBuiltIns": true
},
"development": {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}
}
]
],

"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"roots": ["<rootDir>/app/javascript/packs"],
"moduleDirectories": ["<rootDir>/node_modules"],
"moduleNameMapper": {
"^vue$": "<rootDir>/node_modules/vue/dist/vue.common.js"
"^vue$": "vue/dist/vue.common.js"
},
"moduleFileExtensions": [
"js",
Expand Down

0 comments on commit 3c2269f

Please sign in to comment.