Coverage report task fix for Windoze

This commit is contained in:
Hannah Wolfe 2013-11-11 20:54:48 +00:00
parent 61d693cac9
commit 2e64fcc5d2
2 changed files with 9 additions and 2 deletions

View File

@ -260,7 +260,14 @@ var path = require('path'),
command: 'bourbon install --path <%= paths.adminAssets %>/sass/modules/'
},
coverage: {
command: './node_modules/mocha/bin/mocha --timeout 15000 --reporter html-cov > coverage.html ./core/test/blanket_coverage.js'
command: function () {
// will work on windows only if mocha is globally installed
var cmd = !!process.platform.match(/^win/) ? 'mocha' : './node_modules/mocha/bin/mocha';
return cmd + ' --timeout 15000 --reporter html-cov > coverage.html ./core/test/blanket_coverage.js';
},
execOptions: {
env: 'NODE_ENV=' + process.env.NODE_ENV
}
}
},

View File

@ -1,7 +1,7 @@
var blanket = require("blanket")({
"pattern": ["/core/server/", "/core/client/", "/core/shared/"],
"data-cover-only": ["/core/server/", "/core/client/", "/core/shared/"]
}),
}),
requireDir = require("require-dir");
requireDir("./unit");