0👍
The fix I figured out is to do with Jest’s configuration. Here is the addition of moduleFileExtensions to the Jest configuration in my package.json
file:
{
"jest": {
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.vue$": "vue-jest"
}
}
}
Then I started unit test in the watch mode:
npm run test:unit -- --watchAll
Now whenever I make any change to my Vue components, Jest will rerun the unit tests as expected.
Hope it helps.
- [Vuejs]-Vuejs router.go(-1) not showing on second time
- [Vuejs]-How to call api when change value in vue multiselect
Source:stackexchange.com