Skip to content

Commit 1d531aa

Browse files
potato4deddyerburgh
authored andcommitted
docs: replace from mapCoverage to collectCoverage in Jest sample. (#493)
1 parent 5ac7f61 commit 1d531aa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/en/guides/testing-SFCs-with-jest.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ Next, create a `jest` block in `package.json`:
4848
"transform": {
4949
// process `*.vue` files with `vue-jest`
5050
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
51-
},
52-
"mapCoverage": true
51+
}
5352
}
5453
}
5554
```
@@ -159,7 +158,7 @@ Jest recommends creating a `__tests__` directory right next to the code being te
159158

160159
Jest can be used to generate coverage reports in multiple formats. The following is a simple example to get started with:
161160

162-
Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected. You'll also want [`mapCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#mapcoverage-boolean) to be `true`, for coverage data to be accurate.
161+
Extend your `jest` config (usually in `package.json` or `jest.config.js`) with the [`collectCoverage`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoverage-boolean) option, and then add the [`collectCoverageFrom`](https://facebook.github.io/jest/docs/en/configuration.html#collectcoveragefrom-array) array to define the files for which coverage information should be collected.
163162

164163
```json
165164
{
@@ -169,8 +168,7 @@ Extend your `jest` config (usually in `package.json` or `jest.config.js`) with t
169168
"collectCoverageFrom": [
170169
"**/*.{js,vue}",
171170
"!**/node_modules/**"
172-
],
173-
"mapCoverage": true
171+
]
174172
}
175173
}
176174
```

0 commit comments

Comments
 (0)