From 26ba27c52d583af727cbd841bdd4eb681e2e15ef Mon Sep 17 00:00:00 2001 From: Aodhan Hayter Date: Mon, 9 Jul 2018 11:45:44 -0600 Subject: [PATCH] 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 #6563 is a good example of what could be avoided in the future with this addition to the documentation. --- docs/Configuration.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/Configuration.md b/docs/Configuration.md index 5ea2f8292335..9513d3cc9422 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -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`._ +
+ Help: + 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. + +
+ ### `coverageDirectory` [string] Default: `undefined`