felixge / node-sandboxed-module

A sandboxed node.js module loader that lets you inject dependencies into your modules.
MIT License
342 stars 42 forks source link

Use both the '$$cov_*' and istanbul's default `__coverage__` var to see if istanbul is running #31

Closed robrich closed 10 years ago

robrich commented 10 years ago

Currently it's only looking for the $$cov global variable to know if istanbul is running. If you use istanbul programmatically, it doesn't instantiate $$cov but uses the default __coverage__ var. (see https://github.com/gotwarlost/istanbul/blob/master/lib/instrumenter.js#L340) A great example of using istanbul programatically is https://www.npmjs.org/package/gulp-istanbul.

domenic commented 10 years ago

Merged as 93fce6323356b1c255e1cfeffc03ba41afe5e81e, thanks! New release coming soon.