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?
include
for example the files withspec.tsx
because they contain only tests. This is how i understood. Do i understand correct? – Irelandmain
folder. Please let me know if you understood. – Irelandmain
folder from/cypress
folder. So, yes, i need the coverage only for these files that have tests. But i don't want to specific the list of the files ininclude: []
being hardcoded, i want somehow to get the coverage report only for the tests that are inmain
folder. Could you help please? It will help me a lot. – Irelandmain
? – Ireland