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

feature request: --findRelatedTests --coverage collects coverage for given files only #4245

Closed
aaronabramov opened this issue Aug 11, 2017 · 4 comments · Fixed by #5601
Closed

Comments

@aaronabramov
Copy link
Contributor

this should probably be a completely different CLI flag.
What i'm looking for is more like:

jest --generateCoverageForFiles file1.js file2.js

which will be equivalent of:

jest --findRelatedTests file1.js file2.js --coverage --collectCoverageForm file1.js --collectCoverageFrom file2js

This will simplify and speed up arc unit and arc diff that currently instrument and collect coverage for every single file that's required

@stipsan
Copy link
Contributor

stipsan commented Feb 16, 2018

Is there a reason why it should be a separate flag?

If it could be built in to the --coverage flags behavior I think it might be more in line with what userland expects, based on issues like #5432 and #2256

And it would be super nice if it becomes possible to do things like jest --coverage --changedSince=master and other interesting tooling opportunities. (and avoid this kind of uglyness)

In any case I'm just here to notify you that I'm going to take stab at this. If I shouldn't then I hope you'll let me know 😄

@SimenB
Copy link
Member

SimenB commented Feb 17, 2018

Make sure to take a look at #4246.

Would love to have this feature! 🙂

@stipsan
Copy link
Contributor

stipsan commented Feb 17, 2018

Thanks @SimenB! Through your link I found an answer to why a separate flag is proposed here: #4246 (comment)

@github-actions
Copy link

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.

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