Skip to content

Commit 94ade95

Browse files
committed
Add help details for configuration documentation of collectCoverageFrom
Due to breaking changes in an upgrade of the dependency micromatch from ^2.3.11 to ^3.1.10 many users saw their coverage reporting failing because their glob matching was in an unsupported format. Adding the help text here gives users a good starting point for debugging when they run into issues concerning this option. This should help alleviate support issues created concerning this configuration option. Issue jestjs#6563 is a good example of what could be avoided in the future with this addition to the documentation.
1 parent fa92643 commit 94ade95

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: docs/Configuration.md

+17
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ This will collect coverage information for all the files inside the project's `r
153153

154154
_Note: This option requires `collectCoverage` to be set to true or Jest to be invoked with `--coverage`._
155155

156+
<details>
157+
<summary>Help:</summary>
158+
If you are seeing coverage output such as...
159+
160+
```
161+
=============================== Coverage summary ===============================
162+
Statements : Unknown% ( 0/0 )
163+
Branches : Unknown% ( 0/0 )
164+
Functions : Unknown% ( 0/0 )
165+
Lines : Unknown% ( 0/0 )
166+
================================================================================
167+
Jest: Coverage data for global was not found.
168+
```
169+
170+
Most likely your glob patterns are not matching any files. Refer to the [micromatch](https://github.com/jonschlinkert/micromatch) documentation to ensure your globs are compatible.
171+
</details>
172+
156173
### `coverageDirectory` [string]
157174

158175
Default: `undefined`

0 commit comments

Comments
 (0)