-
Notifications
You must be signed in to change notification settings - Fork 179
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
Difference in SLOC between js-coverage and blanket #113
Comments
I think unfortunately(/hopefully) this issue and #114 have already been resolved, but npm hasn't been updated. I feel like this issue may already be resolved because on the browser side it is no longer counting comments. You can see this in action with I will try to update npm asap. Thanks. |
npm updated to 0.9.8. Can you let me know if you still experience the same problem? Thanks. |
Thanks for the quick update, this problem however still seems to exist on node. The output SLOC/line hit counts dont seem to have changed after upgrading |
Can you provide a sample file? If it's proprietary you can change some of the non-comment lines. There may be some other code in the file that combines with the comment to cause a problem. I've run some tests here of just single line comments and I get the same result in node and in the browser, so I'm thinking that your inconsistency might be the symptom of a more complex bug. |
Here is a toy code example module that seems to reproduce the problem for me:
a test file requires blanket and the above module,
and then mocha is run with: output:
blanket@0.9.8 reported by npm |
Great, thanks for the sample. I'll take a look at this tomorrow and see where the issue is. |
I wrote a test and solved this problem. Thanks for highlighting it. I will commit it in a day or two, I accidentally added it in the middle of another commit, so I'll finish the other features and push it in. |
Fixed in #117 |
Excellent will test today, thanks again! |
I noticed js-coverage and blanket report slightly different SLOC and % coverage
When comparing side-by-side outputs from the HTMLCov reporter it looks like some single line comments are counted as lines of code in blanket
Eg from js-coverage: (file reports 29 SLOC)
from blanket: (file reports 33 SLOC)
Version 0.9.7
The text was updated successfully, but these errors were encountered: