benbria / coffee-coverage

Istanbul and JSCoverage-style instrumentation for CoffeeScript files.
MIT License
145 stars 31 forks source link

Support electron-mocha #87

Open feugy opened 7 years ago

feugy commented 7 years ago

Electron-mocha is a special flavour of mocha that runs test within Electron context.

It works fine with nyc, as long as instrumentation is done by using mocha hooks, like coffee-coverage does.

But I found out it requires some small adaptation to make it works.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 76.545% when pulling 0ec8c3239a0816a87b0f68a299f83d48eb65bdcb on feugy:master into 36e891203b1737b95780df62ea16be52d4e544e1 on benbria:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 76.545% when pulling d9341fdd06046aeea291047fc97db5c43696fa92 on feugy:master into 36e891203b1737b95780df62ea16be52d4e544e1 on benbria:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-47.6%) to 26.998% when pulling c8e91b16e7467c34debbe4c0ba59f311c539f882 on feugy:master into e80b5baed437e822561ac67ab40bf1611a4ae9fe on benbria:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 76.545% when pulling 0c50cce77f234b608bed969c37b4580693293b01 on feugy:master into 36e891203b1737b95780df62ea16be52d4e544e1 on benbria:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 76.545% when pulling 0c50cce77f234b608bed969c37b4580693293b01 on feugy:master into 36e891203b1737b95780df62ea16be52d4e544e1 on benbria:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 76.545% when pulling 0c50cce77f234b608bed969c37b4580693293b01 on feugy:master into 36e891203b1737b95780df62ea16be52d4e544e1 on benbria:master.

feugy commented 7 years ago

Hello @jwalton.

I'm sorry, but I couldn't find any way to increase coverage on my code. Adding test:electron to CI to cover the new report in src/register.coffee didn't helped.

feugy commented 6 years ago

Hello here!

It's been a while since I had to use coffee,-coverage and electron-mocha. Yesterday I find out a regression introduced by the newest version of the coffeescript compiler.

Between coffeescript 2.0.2 and 2.3.1 (the latest at the moment), an internal changes was introduce, and AST nodes don't necessary have locationData attached.

I've added a test to replicate this situation, it occurs when using blocks such as single-line for loops.