Skip to content

Commit f55359e

Browse files
committed
docs: add info on mapCoverage to README
1 parent 836e469 commit f55359e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,26 @@ To define jest-vue as a transformer for your .vue code, map .vue files to the ba
2020
},
2121
```
2222

23-
## Examples
23+
To use source maps, you need to set `mapCoverage` to `true`. A full config will look like this.
24+
25+
```json
26+
{
27+
"jest": {
28+
"moduleFileExtensions": [
29+
"js",
30+
"json",
31+
"vue"
32+
],
33+
"transform": {
34+
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
35+
".*\\.(vue)$": "<rootDir>/jest-vue.js"
36+
},
37+
"mapCoverage": true
38+
}
39+
}
40+
```
41+
42+
## Example Projects
2443

2544
Example repositories testing Vue components with jest and jest-vue:
2645

0 commit comments

Comments
 (0)