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