This repository was archived by the owner on Dec 1, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ Portions of this project are heavily based on parts of [vueify](https://github.c
11
11
" test" : " jest"
12
12
},
13
13
" jest" : {
14
- " scriptPreprocessor" : " <rootDir>/node_modules/vue-typescript-jest/preprocessor.js" ,
14
+ " transform" : {
15
+ " .*\\ .(ts|vue)$" : " <rootDir>/node_modules/vue-typescript-jest/preprocessor.js"
16
+ },
15
17
" moduleFileExtensions" : [
16
18
" ts" ,
17
19
" js" ,
@@ -26,6 +28,11 @@ Portions of this project are heavily based on parts of [vueify](https://github.c
26
28
},
27
29
```
28
30
31
+ * For Jest v16 (earlier versions not tested), use the following instead of ` transform `
32
+ ``` js
33
+ " scriptPreprocessor" : " <rootDir>/node_modules/vue-typescript-jest/preprocessor.js" ,
34
+ ```
35
+
29
36
* Make sure a suitable ` tsconfig.json ` is present to specify your required TypeScript compiler options
30
37
* Write a test for a Vue.js component
31
38
``` typescript
Original file line number Diff line number Diff line change 23
23
"prepublish" : " eslint preprocessor.js && jest --no-cache --coverage"
24
24
},
25
25
"jest" : {
26
- "scriptPreprocessor" : " <rootDir>/preprocessor.js" ,
26
+ "transform" : {
27
+ ".*\\ .(ts|vue)$" : " <rootDir>/preprocessor.js"
28
+ },
27
29
"moduleFileExtensions" : [
28
30
" ts" ,
29
31
" js" ,
43
45
"babel-preset-es2015" : " ^6.0.0" ,
44
46
"babel-runtime" : " ^6.0.0" ,
45
47
"eslint" : " ^3.7.0" ,
46
- "eslint-config-locoslab" : " github:locoslab/eslint-config-locoslab " ,
48
+ "eslint-config-locoslab" : " 0.1.0 " ,
47
49
"html2jade" : " ^0.8.4" ,
48
- "jest-cli" : " ^16 .0.1 " ,
50
+ "jest-cli" : " ^17 .0.0 " ,
49
51
"pug" : " ^2.0.0-beta6" ,
50
52
"typescript" : " ^2.0.3" ,
51
53
"vue" : " ^2.0.1" ,
You can’t perform that action at this time.
0 commit comments