expresso icon indicating copy to clipboard operation
expresso copied to clipboard

expresso --cov does not print code coverage on Node 0.4.8

Open jeremys opened this issue 13 years ago • 2 comments

I don't know why but expresso does not print the code coverage with my Node 0.4.8, by looking in to expresso bin, I can see that the file existing in lib-cov is never loaded, when hacking the code to force loading of my file with runFiles(['lib-cov/file.js']);, I can see the code coverage. I suppose there is an issue here:

childProcess.exec('rm -fr lib-cov && node-jscoverage lib lib-cov', function(err){
                if (err) throw err;
                require.paths.unshift('lib-cov');
                run(files);
            })

What do you think?

jeremys avatar Jun 21 '11 16:06 jeremys

+1 for node 0.4.9

mattmcmanus avatar Jul 05 '11 15:07 mattmcmanus

I've had this issue as well but on 0.4.9 -1 for node 0.4.9 ;)

That being said...i can get the demo files ( tests and foo/bar libs) to run...I can mock a very simple function and test in new files and it runs.....

I'm trying something a bit more complex and it appears to die....turns out I had this:

var assert, pantry; pantry = require('../lib/pantry'); assert = require('assert');

and that in effect mucked up my path (even though the testing appeared to pass), node-jscoverage or jscoverage must not like the ../ in the path. So when I changed to the following it worked...give it a try if you have something similiar.

var assert, pantry; pantry = require('pantry'); assert = require('assert');

mehtryx avatar Aug 05 '11 18:08 mehtryx