Skip to content

Commit

Permalink
Add help for configuration 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 rlated to this option. This will
help alleviate support issues (such as jestjs#6563) concerning this configuration
option.
  • Loading branch information
AodhanHayter committed Jul 9, 2018
1 parent fa92643 commit c2d11fc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ 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 c2d11fc

Please sign in to comment.