visionmedia / expresso

use mocha
http://visionmedia.github.com/expresso
759 stars 89 forks source link

can't get coverage to show in expresso 0.9.2 and node 0.6.4 #163

Open katowulf opened 12 years ago

katowulf commented 12 years ago

Hi, I've tried every permutation I can to get coverage to show in expresso and can't seem to sort it out.


[myuser ~/myapp]$  node -v; expresso -v; node-jscoverage -V
v0.6.4
0.9.2
jscoverage 0.4
Character encoding support: iconv

[myuser ~/myapp]$ node-jscoverage lib lib-cov

[myuser ~/myapp]$ ls -d */
lib/  lib-cov/  test/

[myuser ~/myapp]$ cat lib-cov/util/index.js
/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['util/index.js']) {
  _$jscoverage['util/index.js'] = [];
  _$jscoverage['util/index.js'][2] = 0;
  _$jscoverage['util/index.js'][3] = 0;
  _$jscoverage['util/index.js'][4] = 0;
  _$jscoverage['util/index.js'][5] = 0;
  _$jscoverage['util/index.js'][7] = 0;
... and so on ...

[myuser ~/myapp]$ cat test/test.js

var myapp = require('myapp');

exports.testIsArray = function(beforeExit, assert) {
   assert.equal(false, myapp.util.isArray(null));
}

[myuser ~/myapp]$ expresso

   100% 1 tests

[myuser ~/myapp]$ expresso -c

   100% 1 tests

[myuser ~/myapp]$ expresso -I lib-cov -c

   100% 1 tests

[myuser ~/myapp]$ expresso -I lib-cov --cov

   100% 1 tests
nob13 commented 11 years ago

I have the same problem, did you found a solution yet?