Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add help details for configuration documentation of collectCoverageFr…
Browse files Browse the repository at this point in the history
…om (jestjs#6563)

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.
AodhanHayter committed Jul 9, 2018
1 parent fa92643 commit 87af72a
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
@@ -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`

0 comments on commit 87af72a

Please sign in to comment.