Skip to content

Commit 10c9d1e

Browse files
committedMar 25, 2025
chore: add documentation on expectFrontendCoverageOnly
1 parent d073a21 commit 10c9d1e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

Diff for: ‎README.md

+15
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,21 @@ After:
251251

252252
![Cypress knows to expect the backend code coverage only](./images/expect-backend.png)
253253

254+
### expectFrontendCoverageOnly
255+
256+
If there is ONLY frontend code coverage, set `expectFrontendCoverageOnly: true` in the `cypress.json` file. Otherwise, Cypress complains that it cannot find the frontend code coverage.
257+
258+
```json
259+
{
260+
"env": {
261+
"codeCoverage": {
262+
"url": "http://localhost:3003/__coverage__",
263+
"expectFrontendCoverageOnly": true
264+
}
265+
}
266+
}
267+
```
268+
254269
## Custom report folder
255270

256271
You can specify a custom report folder by adding `nyc` object to the `package.json` file. For example, to save reports to `cypress-coverage` folder, use:

0 commit comments

Comments
 (0)