Skip to content

collectCoverageOnlyFrom Object should be based on path patterns not direct paths only #182

@securingsincity

Description

@securingsincity

Currently the options.collectCoverageOnlyFrom is based on direct paths only. However if you have a much larger project your configuration file could become unruly.

Here is an example of how it currently works:

"jest": {
    "collectCoverage": true,
    "collectCoverageOnlyFrom" : {
      "../../public/js/modules/advanced.jsx" : true,
      "../../public/js/modules/base.jsx" : true,
      "../../public/js/modules/advancedMedical.jsx" : true,
      "../../public/js/modules/advancedMedicalWithPCP.jsx" : true,
    },

And here is how I'd love to see it :

"jest": {
    "collectCoverage": true,
    "collectCoverageOnlyFrom" : {
      "../../public/js/modules/**.jsx" : true,
    },

I mentioned this functionality in #178 as a perfect dovetail of that work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions