question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

electron-mocha and istanbul/isparta

See original GitHub issue

Any ideas on how to get istanbul or isparta to generate a coverage report based on electron-mocha results. I run the following command and get the following error:

./node_modules/.bin/istanbul cover electron-mocha -- --compilers js:babel/register --recursive


  Test app menu creation
    ✓ should set isQuitMenu to true if quit is clicked


  1 passing (19ms)

No coverage information was collected, exit without writing coverage information

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:33 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
inukshukcommented, Sep 13, 2018

Basically, yes. Note that if you’re using babel already you can now just use the excellent istanbul-plugin to instrument your code. If you do this, you really only need to write out the __coverage__ object after the tests have run. (I write them out for both renderer and main thread tests, then combine them using nyc report from the command line).

0reactions
bennycodecommented, Feb 15, 2019

Thanks everyone for sharing your discoveries when adding code coverage to your Electron applications. It helped me to get code coverage for our app which is written in TypeScript. So if you need another example on how to set it up, then this PR might be of help: https://github.com/wireapp/wire-desktop/pull/2215 💐

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - electron-mocha and istanbul/isparta - - Bountysource
Any ideas on how to get istanbul or isparta to generate a coverage report based on electron-mocha results. I run the following command...
Read more >
electron-mocha/CHANGELOG.md - UNPKG
The CDN for electron-mocha. ... 87, - Fix stdio from renderer process in Electron 5. 88. 89, 8.0.1 / 2019-04-09 ... "electron-mocha and...
Read more >
Code Coverage for ES6 using gulp istanbul - Stack Overflow
I'm trying to generate istanbul coverage report for my node js es6 application that has mocha tests. I have used isparta to instrument...
Read more >
electron-mocha | Yarn - Package Manager
Mocha testing in Electron. This project has two main value propositions: You can now easily test any JavaScript app in a real browser...
Read more >
https://raw.githubusercontent.com/jprichardson/ele...
See: https://github.com/jprichardson/electron-mocha/pull/31 - clean up require statements (Electron ... "electron-mocha and istanbul/isparta" [#18]: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found