Skip to content
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

config#collectCoverageFrom #1349

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

aaronabramov
Copy link
Contributor

No description provided.

@ghost ghost added the CLA Signed ✔️ label Aug 1, 2016
"packages\/jest"
"collectCoverageFrom": [
"*.js",
"!setup.js"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also can specify excludes. so the default should be something like

collectCoverageFrom = [
  '**/*.js',
  '!*__mocks__*',
  '!*node_modules*',
];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@cpojer
Copy link
Member

cpojer commented Aug 2, 2016

This looks good!

If we are doing a major version bump for this, should we completely remove coverageIgnorePatterns and collectCoverageOnlyFrom? I don't think these are important enough that we have to do two majors for deprecation + removal, so I'm ok with being radical.

@aaronabramov
Copy link
Contributor Author

@cpojer i would rather keep it secret and undocumented for a while. I want to see how easy it is to use it and how it performs. I'm not really a fan of having both regexes and globs together :)

@cpojer
Copy link
Member

cpojer commented Aug 2, 2016

Ok.

@ghost ghost added the CLA Signed ✔️ label Aug 2, 2016
@aaronabramov aaronabramov merged commit 6ea16b5 into jestjs:master Aug 2, 2016
@aaronabramov aaronabramov deleted the collectCoverageFrom branch August 2, 2016 20:12
@faisalil
Copy link

faisalil commented Sep 2, 2016

how is this going to work with scriptPreprocessors? I am using typescript and using a preprocessor for that.

@faisalil
Copy link

faisalil commented Sep 2, 2016

Also, when are you guys planning to document this?

@aaronabramov
Copy link
Contributor Author

@faisalil it'll first run the files through your preprocessor and then through the coverage instrumenter.
The results can be a little off but mostly accurate (if your preprocessor doesn't retain lines, the line coverage will not be accurate at all)
We still have some work to do on getting globs into jest, and then we'll write docs for it

@github-actions
Copy link

This pull request 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants