-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Run code coverage for a single file #23612
Comments
/cc @bcoe |
@wnordmann if I understand correctly you want to just get the coverage provided by running a single test? |
@mhdawson correct. The main goal is a document update allowing for quick testing / verifying of code coverage. |
@wnordmann can you try out this branch https://github.com/mhdawson/io.js/tree/cov-single It has an additional target You would use as follows
I |
If that works for you I'll PR it in. |
@mhdawson @wnordmann sorry for dropping this thread on the floor; Not going to lie, I was making an effort to get #23941 over the finish line (which has the potential to significantly simplify coverage collecting. Once #23941 lands, collecting coverage for a single file becomes as simple as:
|
I appreciate the two solutions to the problem. I'll hold out and test with #23941 once it lands. |
@wnordmann : #23941 landed. So you are still gonna work on this? I just tried playing around and looks like the following command does generates the coverage:
However, the |
@wnordmann @antsmartian please try: which was just landed; it has new instructions. |
I believe this is resolved or not further actionable. Closing. Can reopen if necessary |
The directions for running code coverage do not detail how to run coverage for a single file. It would improve performance when writing tests with the goal of improving coverage to be able to test one file at a time.
https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#test-coverage
The text was updated successfully, but these errors were encountered: