Page 1 of 1

Using jscoverage with spidermonkey (embedded, not web)

Posted: 2009-06-03 7:08 am
by bradh
Hi,

I'm interested in code coverage for a utility that uses javascript (spidermonkey engine) without any HTML / web / network related stuff. [Its a plugin for gcc, called dehydra].

I've tried applying jscoverage, but it fails quite early with
../libs/dehydra.js:2: JS Exception: ReferenceError: top is not defined
Is there any way to use jscoverage for this, or do I need to find another tool? If so, any suggestions?

Re: Using jscoverage with spidermonkey (embedded, not web)

Posted: 2009-06-03 3:04 pm
by Ed
In the Subversion repository, there is an experimental, undocumented command-line option called --no-browser that may be helpful.

However, right now there is no functionality to actually display coverage data, so you would have to write this yourself. This would involve examining the global variable _$jscoverage when your program/tests are done running.