-
Notifications
You must be signed in to change notification settings - Fork 31
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
Not using --recursive
causing problems?
#55
Comments
The obvious thing to check off the top of my head is; Do your unit tests run straight from your .coffee files, or are they loading your compiled .js files? If you're running from compiled code, and trying to use run-time instrumentation, the coffee-coverage never has a chance to get in there and do it's thing. |
The tests run straight from coffee files. The entire project is coffee actually, there's no js and no compiling (except for a task I use to convert before publishing, which was formerly used for js instrumentation before I switched to coffee-coverage).\ This is the project, if that helps at all. |
Just gave this a quick try, and I'm seeing statement coverage of |
I'm wondering if this:
is the problem. I'm wondering if mocha is somehow loading these files without coverage... |
If I do:
I get 40% coverage. If I do:
I get 18% coverage... So that's maybe not it. :/ |
If I hack up coffee-coverage to show what it's instrumenting, then I see:
But then I never see any more coffee files get instrumented. It's like the .coffee extension handler is somehow getting un-registered. Hrm. |
Huh, very strange. Thanks for investigating this, and glad it's not just me doing something stupid! If there's anything else I can help with here happy to do so, just let me know 😀 |
Did you ever get this working, BTW? |
Nope. I've got it working with other projects, but not with this one 😢 |
Hey there,
Thanks for making such a fantastic project! Just a quick question -- I'm setting up a existing large project that formerly compiled code in order to get coverage so that it works with coffee-coverage. However, I'm finding that the report generated shows little to no actual coverage at all, while the compiled report was quite high and the project is tested thoroughly. I have followed instructions exactly, and it's not erroring out, just giving an incorrect report. The one thing I am not including is the
--recursive
flag, as it's not needed to run my test suite. I tried including this, but then mocha tried to run some of the fixtures included in the tests folder and errored.Is the
--recursive
flag necessary to generate correct coverage? If not, what further information could I provide to make this incorrect coverage issue easier to shed light on? And if so, how do people typically deal with fixtures being run as tests with the recursive flag?Thanks again!
The text was updated successfully, but these errors were encountered: