A locoslab/vue-typescript-jest JavaScript port to allow Jest load .vue files in tests.
Portions both preprocessors are heavily based vueify (Copyright (c) 2014-2016 Evan You).
- add package you your project
yarn add --dev jest-vue-preprocessor
ornpm install --saveDev jest-vue-preprocessor
- modify package.json's jest section by adding/editing moduleFileExtensions and transform properites:
```json
"jest": {
"moduleFileExtensions": [
"js",
"vue"
],
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/jest-vue-preprocessor"
}
}
```
- Start writing test that can import
*.vue
components - see example ./tests/index.spec.js - Profit!