From 087281a414abee87a97e62bb8466e6813e560f6c Mon Sep 17 00:00:00 2001 From: Jeff Hansen Date: Fri, 6 Oct 2017 10:31:50 +0200 Subject: [PATCH] docs: add info about `coveragePathIgnorePatterns` (#4602) 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. --- docs/en/Troubleshooting.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/Troubleshooting.md b/docs/en/Troubleshooting.md index dd0540906ae1..6a4ad92ab085 100644 --- a/docs/en/Troubleshooting.md +++ b/docs/en/Troubleshooting.md @@ -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).