Skip to content

Commit 966dd34

Browse files
authored
Merge pull request #229 from sibiraj-s/update-jest
Support Jest 25
2 parents 7189409 + 72b43d7 commit 966dd34

File tree

3 files changed

+871
-650
lines changed

3 files changed

+871
-650
lines changed

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@
22

33
Jest Vue transformer with source map support
44

5-
> **NOTE:** This is documentation for `vue-jest@3.x`. [View the vue-jest@2.x documentation](https://github.com/vuejs/vue-jest/tree/e694fc7ce11ae1ac1c778ed7c4402515c5f0d5aa)
5+
> **NOTE:** This is documentation for `vue-jest@4.x`. [View the vue-jest@3.x documentation](https://github.com/vuejs/vue-jest/tree/v3)
66
77
## Usage
88

99
```bash
1010
npm install --save-dev vue-jest
1111
```
1212

13-
### Usage with Babel 7
14-
15-
If you use [jest](https://github.com/facebook/jest) < 24.0.0 and [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest) make sure to install babel-core@bridge
16-
17-
```bash
18-
npm install --save-dev babel-core@bridge
19-
```
20-
2113
## Setup
2214

2315
To define `vue-jest` as a transformer for your `.vue` files, map them to the `vue-jest` module:
@@ -28,6 +20,7 @@ To define `vue-jest` as a transformer for your `.vue` files, map them to the `vu
2820
"transform": {
2921
"^.+\\.vue$": "vue-jest"
3022
}
23+
}
3124
}
3225
```
3326

@@ -45,8 +38,6 @@ A full config will look like this.
4538
}
4639
```
4740

48-
If you're on a version of Jest older than 22.4.0, you need to set `mapCoverage` to `true` in order to use source maps.
49-
5041
## Example Projects
5142

5243
Example repositories testing Vue components with jest and vue-jest:

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"hamljs": "^0.6.2",
4949
"husky": "^1.1.4",
5050
"jade": "^1.11.0",
51-
"jest": "^24.0.0",
51+
"jest": "^25.1.0",
5252
"less": "^3.9.0",
5353
"lint-staged": "^8.0.5",
5454
"prettier": "^1.16.1",
@@ -62,7 +62,7 @@
6262
},
6363
"peerDependencies": {
6464
"@babel/core": "7.x",
65-
"jest": "^24.x",
65+
"jest": "^25.x",
6666
"vue": "^2.x",
6767
"vue-template-compiler": "^2.x"
6868
},
@@ -73,7 +73,7 @@
7373
"convert-source-map": "^1.6.0",
7474
"extract-from-css": "^0.4.4",
7575
"source-map": "0.5.6",
76-
"ts-jest": "^24.0.0"
76+
"ts-jest": "^25.2.1"
7777
},
7878
"repository": {
7979
"type": "git",

0 commit comments

Comments
 (0)