Skip to content

Commit

Permalink
Add help details for configuration documentation of collectCoverageFrom
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AodhanHayter committed Jul 9, 2018
1 parent fa92643 commit 94ade95
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,23 @@ This will collect coverage information for all the files inside the project's `r

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

<details>
<summary>Help:</summary>
If you are seeing coverage output such as...

```
=============================== Coverage summary ===============================
Statements : Unknown% ( 0/0 )
Branches : Unknown% ( 0/0 )
Functions : Unknown% ( 0/0 )
Lines : Unknown% ( 0/0 )
================================================================================
Jest: Coverage data for global was not found.
```

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.
</details>

### `coverageDirectory` [string]

Default: `undefined`
Expand Down

0 comments on commit 94ade95

Please sign in to comment.