-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collectCoverageOnlyFrom
documentation is not clear
#1536
Comments
Oh yeah, you are right, this isn't great. Would you mind sending a PR with an update? See https://github.com/facebook/jest/blob/master/package.json#L47 for an example. It's also mentioned here: http://facebook.github.io/jest/blog/2016/09/01/jest-15.html#rewritten-code-coverage-support |
Is |
Oh wait, no, sorry. I mixed it up.
The two options are mutually exclusive. |
Are their inputs arrays of globs in both cases? |
No, collectCoverageFrom is the only option that accepts globs currently (it is completely new). collectCoverageOnlyFrom literally only accepts direct, full paths, to files. It is used internally and an ugly leftover of darker times. |
{
"file1.js": true,
"file2.js": false
} there was a reason to implement it this way for the internal runner, but for the outside world it probably makes no sense. should we remove it from the docs? |
Probably, yes. |
@DmitriiAbramov would you mind adding docs for |
will do |
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. |
Why is this an object representing a set of files? What is the format of this object? Why is it not an array? What are types of its keys and values? Does it have to include “files” as the docs say, or can those be folders too? Would specifying it automatically enable
collectCoverage
or does it only have effect whencollectCoverage
is enabled?The text was updated successfully, but these errors were encountered: