You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug? feature What is the current behavior?
It is not possible to collect coverage if tests are in the same file with the source. Since should_instrument.js checks if file name matches testRegex or testMatches currently it is not possible to collect coverage from these files.
It would be nice to have an option to check for coverage even if the file is a test file. Normally you wouldn't want to collect coverage from all of your test files.
Having and option like enforceCoverageRegex : ".*\\.test\\.js$" would allow you to collecting coverage from the files that are named in a certain way.
I am currently experimenting with the idea and i would like to come with a PR as well.
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
feature
What is the current behavior?
It is not possible to collect coverage if tests are in the same file with the source. Since
should_instrument.js
checks if file name matchestestRegex
ortestMatches
currently it is not possible to collect coverage from these files.We have several tests similar to this example.
What is the expected behavior?
It would be nice to have an option to check for coverage even if the file is a test file. Normally you wouldn't want to collect coverage from all of your test files.
Having and option like
enforceCoverageRegex : ".*\\.test\\.js$"
would allow you to collecting coverage from the files that are named in a certain way.I am currently experimenting with the idea and i would like to come with a PR as well.
The text was updated successfully, but these errors were encountered: