Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit 4828db4

Browse files
committed
Update README to cover Jest v16 and v17 and use v17
1 parent 929d4f6 commit 4828db4

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Portions of this project are heavily based on parts of [vueify](https://github.c
1111
"test": "jest"
1212
},
1313
"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+
},
1517
"moduleFileExtensions": [
1618
"ts",
1719
"js",
@@ -26,6 +28,11 @@ Portions of this project are heavily based on parts of [vueify](https://github.c
2628
},
2729
```
2830

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+
2936
* Make sure a suitable `tsconfig.json` is present to specify your required TypeScript compiler options
3037
* Write a test for a Vue.js component
3138
```typescript

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
"prepublish": "eslint preprocessor.js && jest --no-cache --coverage"
2424
},
2525
"jest": {
26-
"scriptPreprocessor": "<rootDir>/preprocessor.js",
26+
"transform": {
27+
".*\\.(ts|vue)$": "<rootDir>/preprocessor.js"
28+
},
2729
"moduleFileExtensions": [
2830
"ts",
2931
"js",
@@ -43,9 +45,9 @@
4345
"babel-preset-es2015": "^6.0.0",
4446
"babel-runtime": "^6.0.0",
4547
"eslint": "^3.7.0",
46-
"eslint-config-locoslab": "github:locoslab/eslint-config-locoslab",
48+
"eslint-config-locoslab": "0.1.0",
4749
"html2jade": "^0.8.4",
48-
"jest-cli": "^16.0.1",
50+
"jest-cli": "^17.0.0",
4951
"pug": "^2.0.0-beta6",
5052
"typescript": "^2.0.3",
5153
"vue": "^2.0.1",

0 commit comments

Comments
 (0)