Constellation / ibrik

CoffeeScript meets Istanbul - code coverage tool for CoffeeScript
BSD 2-Clause "Simplified" License
79 stars 32 forks source link

CoffeeScriptRedux `extends` compilation handling breaking coverage #19

Open samuelhorwitz opened 10 years ago

samuelhorwitz commented 10 years ago

https://github.com/michaelficarra/CoffeeScriptRedux/issues/314

I don't know if this is on Ibrik's end or CSR's end, but I've submitted the issue to CSR since it originates in their code. On Ibrik's end, it may be necessary (depending on what CSR says is expected behavior) to somehow clean out the CSR instance between files.

To sum up the other issue, essentially having a file with extends will cause every subsequently processed Coffeescript file to include the helper functions that extends needs when compiled to JS. This causes code coverage to report otherwise 100% covered files as being incompletely covered despite every line in the reports being green because the boilerplate functions like isOwn$ and extends$ are never reached by files that don't actually need to use these.

samuelhorwitz commented 9 years ago

This was apparently fixed with the release of 2.0.0 and the move away from CSR. Seems to work for me.

However, one more issue is it would be great if full coverage was reported when the CS extends helper is compiled into the actual source. Currently, coverage is impossible to be at 100% on any extended class because of the conditional branches introduced by the compiler.

samuelhorwitz commented 8 years ago

Just as a note, in regards to the extends syntax, I have pushed up a patch in the form of a PR a while ago, that people can use as needed #36