I am using Cypress and Nyc configurations. My folder structure looks like this:
|/project
| /coverage/
/lcov-report
/index.html
|/cypress
| /main
/car
/car.spec.tsx
/color.spec.tsx
...
| /integration
I need a solution to get inside the index.html
only the tests coverage from main
folder. So as a result in index.html
i need to see only the coverage for the tests that was written there.
I noticed that NYC docs. have some configurations https://github.com/istanbuljs/nyc#common-configuration-options . But there i can specifiy only the files that contains features in include
, but in each folder from my project i could have a test file and i can not specify every time the each new file only to get the coverage.
Question: Is there a solution to get the coverage only for the main
folder or to get the coverage for the files that have already written a spec
test? Or to get a coverage for the file that have spec.tsx
extension?