Create-react-app: Support Jest collectCoverageFrom option

Created on 11 Oct 2016  路  7Comments  路  Source: facebook/create-react-app

https://github.com/facebook/jest/issues/1211

When Jest performs code coverage, it seems to only cover the files that were tested instead of all files in my source directory. This gives a skewed percentage of files tested.

Jest 15 added a new config option for this called `collectCoverageFrom``

Can we have support for this in CRA?

Most helpful comment

We can add it to our config. Should it just look at app's src/? Would you like to send a PR?

All 7 comments

We can add it to our config. Should it just look at app's src/? Would you like to send a PR?

Seems someone else raised a PR:

pick up all files for coverage reporting #905

Any update on this ? Is the PR acceptable ? I notice its not CLA signed so does it need to be resubmitted ?

I submitted a pull request #961
Let me know if its acceptable.

Fixed in #961, will be out in 0.8.0.

It is also configurable in the next version.
https://github.com/facebookincubator/create-react-app/pull/1830

Please help beta test the new version that includes this change!
https://github.com/facebookincubator/create-react-app/issues/2172

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aranir picture Aranir  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

onelson picture onelson  路  3Comments

barcher picture barcher  路  3Comments

wereHamster picture wereHamster  路  3Comments