Using jscoverage with spidermonkey (embedded, not web)

Questions, problems, suggestions, bug reports, and so on.
Post Reply
bradh

Using jscoverage with spidermonkey (embedded, not web)

Post 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?
Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

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

Post 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.
Post Reply