-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
At least one file missing from coverage... #980
Comments
NYC is a complex system, we need a link to a repo which demonstrates the failure. Please be sure the demo is using the current version of |
Same issue, but I cannot reproduce in other projects nor post company code to demo. =/ I did have co-workers pull my branch down and confirm that it's an issue on their machines too. |
Yeah, I'm sure it's very complex. The principals are easy, but I can imagine how complicated it is to get it right. Anyway, I'm making a note. I'm still in development and the code is not yet publicly available. Once it is so, I'll make sure it still fails and include all the necessary info here. Thank you. |
@AlexisWilke @CodisRedding we are just looking for a minimal reproduction in public repo. Something that simulates the combination of packages you have and your build system. We don't need your actual projects, but just to troubleshoot your config or your setup or check package versions etc. |
Sorry @JaKXz I moved on to use hapijs/lab. I don't have a way to reproduce this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I see this was closed, but wanted to throw some potentially helpful info for others coming to this issue. I had this issue when we upgraded to nyc version 14.1.1 but was able to get full instrumentation back by reverting to using nyc version 13.2.0 |
I faced this same issue. @vaelinn123 your suggestion worked like a charm. Even 13.3.0 is broken. Some change after 13.2.0 is causing this issue. |
I recommend someone post a new issue including all required information, especially a minimal reproduction in a public repo. Without that we cannot know what the issue is and it will not get fixed. Note 13.x no longer receives any fixes. |
No matter which version, the test gets covered but not the file it covers. Only happens with one file. Tried to clear cache |
I experienced the same issue. one file would not show up in the coverage report. removing the node_modules folder and package-lock.json file as suggested in related issues did not fix it. I went on and commented all the code in the file that was missing and sure enough it showed up again. after un-commenting code bit by bit, I noticed that one of my function was incorrect.
after removing the duplicate parameter the file showed up in the coverage report again. so in the end, it was just malformed code. copy-paste error on my side. not sure if this is related. I just wanted to share how I fixed my issue in case someone else runs into the same problem. also my dependencies: "aws-sdk-mock": "^5.0.0", "chai": "^4.2.0", "mocha": "^7.0.0", "assert": "^2.0.0", "nyc": "^15.0.0", "sinon": "^8.0.0" |
I stumbled across the same problem. Following @frankzieglermbc , I checked my code and sure enough it was because of malformed code. In my case 002 was being passed in an object which is malformed JSON. |
I had the same problem, not showing up a file in test coverage. As @frankzieglermbc said, i checked again the code. The causing problem was naming a variable |
I faced this issue too. Turns out Good option - Use a default linting guide like the one from Airbnb - https://github.com/airbnb/javascript |
Also chiming in because I encountered this issue - for me, one of my express routes contained |
Link to bug demonstration repository.
Right now I don't have a git with my code, it's not quite ready yet...
Expected Behavior
I get all the .js files covered in the output.
Observed Behavior
One of my files is missing in one folder (I did not check each folder... specifically, the file I was most working on disappeared)
Forensic Information
Operating System: Ubuntu 16.04
Non-Working Environment Information:
With the "Working Environment Information" plus the latest
babel-plugin-istanbul
, is when I started experiencing the issue. The line numbers for errors was fixed, but the otherwise working coverage started seeing files go missing.This is probably the same problem as experienced by others (see #476 and #686). Removing the babel plugin and all the
node_modules
,coverage
,package-lock.json
and reinstalling withnpm install
fixed the problem. Keeping babel around and it continues to fail.My
.babelrc
file:My extra
nyc
setup:That's it. I did not notice right away, but at some point one of the files was out of date. I delete the coverage folder and it did not come back...
Working Environment Information:
With the following I never had any problem.
The text was updated successfully, but these errors were encountered: