Skip to content

Commit

Permalink
docs: add info about coveragePathIgnorePatterns (#4602)
Browse files Browse the repository at this point in the history
I had an issue where `coveragePathIgnorePatterns` didn't have any effect, which was caused by some leftover config in my `.babelrc` from when I was using Mocha + Nyc. I documented the cause and fix to help others facing the same issue.
  • Loading branch information
jeffijoe authored and cpojer committed Oct 6, 2017
1 parent 596b5dc commit 087281a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/en/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ Jest takes advantage of new features added to Node 4. We recommend that you
upgrade to the latest stable release of Node. The minimum supported version is
`v4.0.0`. Versions `0.x.x` are not supported.

### `coveragePathIgnorePatterns` seems to not have any effect.

Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istanbul, and therefore also tells Istanbul what files to instrument with coverage collection. When using `babel-plugin-istanbul`, every file that is processed by Babel will have coverage collection code, hence it is not being ignored by `coveragePathIgnorePatterns`.

### Still unresolved?

See [Help](/jest/help.html).

0 comments on commit 087281a

Please sign in to comment.