gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

Support electron-mocha #599

Open rgbkrk opened 8 years ago

rgbkrk commented 8 years ago

Istanbul and electron mocha don't play well together easily:

$ $(npm bin)/istanbul cover $(npm bin)/electron-mocha -- --renderer --compilers js:babel-core/register 'test/renderer/**/*.js'
(electron) options.preload is deprecated. Use options.webPreferences.preload instead.

  Notebook
    ✓ accepts an Immutable.List of cells (73ms)

  setNotebook
    ✓ converts a JSON notebook to our commutable notebook and puts in state

  updateExecutionCount
    ✓ updates the execution count by id

  newCellAfter
    ✓ creates a brand new cell after the given id

  reducers
    ✓ has a function defined for each Symbol prop

  createStore
    ✓ sets up our store model

  6 passing (226ms)

No coverage information was collected, exit without writing coverage information
ngprasad commented 8 years ago

Any updates on this? Even I am facing this issue.

ngprasad commented 8 years ago

Please post updates on this. I don't want to open a new issue for this.

rgbkrk commented 8 years ago

New issue won't really help any. Someone has to take time to investigate it and patch it either way. Filling issue trackers with duplicate bugs slows down maintainers.

ngprasad commented 8 years ago

@rgbkrk Totally agree. Have you found any workaround?

rgbkrk commented 8 years ago

For unit tests I stopped using electron-mocha and started using nyc. Additionally, I'm looking at switching over to spectron for some of our functional tests.