-
Notifications
You must be signed in to change notification settings - Fork 83
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
Function Coverage #61
Comments
Sure. Why not fork JSCover on GitHub and add your changes. I'm happy to take look. Once you've got something workable, we can look at merging it back in. |
Sorry for the delay, and for replying from a new GitHub account. I've fork'ed and added my changes. Please take a look and let me know if you think it's merge-worthy: https://github.com/howard-abrams/JSCover |
Sure |
The code changes that are there look OK, but I just ran it on YUI3, converted to LCOV and can't see any function data. From the code and running the tests I can see the following still needs implementing:
The 'jscoverage.html' UI is a bit crowded for space, so it would be good to make function data inclusion conditional. There's currently no JS code to do this - the branch data is always displayed, so that could be even trickier. I'll try to fork you fork - and see if I can send pull requests across. |
Let me know how it goes on the fork'd fork. I intentionally left off jscoverage.html and the config switch until you saw what I had done. While not "complete" perhaps the function coverage can be added back into the trunk with the caveat that it's only visible via LCOV for now. LCOV should be working. My test case was to collect coverage from multiple files/runs, merge them, run the LCOV report, and then generate an html report from that using jgenhtml - seems to work. Also, the unit tests do some (minimal) coverage of that functionality. |
Having looked at this, I think it'd be easier to add me as a committer to your fork.
I can't see any function data in the JSON from my test either. |
BTW - I've made a minor change you should fetch. I noticed the instrumented code appearing in the branch source alert, which should now be fixed. |
I've made you a collaborator. I didn't modify jscoverage.js at this point; I assumed that was only used for the jscoverage.html report, no? As far as I can tell, everything is checked in, are you sure you built it? :) I don't doubt that I've missed something here, and sorry for all the questions, but... do you see the changes in NodeProcessor and SourceProcessor being called? |
Thanks.
Yes, but only incorrect references from an existing bug that I fixed in the last check-in. |
I rebased your repository to pick up the latest changes and added a test. Also, before we get too far, we need to sort out the source credits. I'm happy to leave them in (I may alter the format a bit - possibly to JavaDoc), but "Function Coverage added by Howard Abrams..." will need to include me on files I touch or write tests for (I consider untested code incomplete). I'll certainly credit you on the web-site and the Git history should reflect your contributions after the merge. Let me know if you're OK with this. |
I've pretty much made all the changes I think need to be added except for updating the mannual. Please review and let me know if you're happy for me to merge back to the main repository. |
Thanks - and sorry, I thought I had replied to your previous comment. I took a look through your changes and didn't see anything concerning, and I rebuilt and everything in-my use-case seems to still be working for me. If you're happy with things, then yes, please merge it back. |
Done. Your commits are in the history. Will do some final tidying and release in a day or two. |
I saw on the to-do list a mention of function coverage.
This was something I was interested in, so I created a rough implementation; are you interested in a donation so that you can take it the rest of the way? What I have works, but I'm sure I missed some corner cases, etc.
BTW, I started on this because what I'm really interested in is per-function path coverage; any chance that can be added to the to-do list?
The text was updated successfully, but these errors were encountered: