Permalink
Browse files

Fixing --no-coverage

  • Loading branch information...
1 parent 7416173 commit 93a209924ced02e4d137df699c110a753903fb99 @davglass committed Sep 7, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/module.js
View
@@ -315,13 +315,13 @@ var buildCoverage = function (mod, name, callback) {
queue.read([
path.join(buildDir, fileName, fileName + '.js')
])
- .log('coverage file read, starting coverage')
+ .log('coverage file read, starting coverage for: ' + fileName + '/' + fileName + '.js')
.coverage({
charset: 'utf8',
name: 'build/' + fileName + '/' + fileName + '.js'
})
.check()
- .log('writing coverage file')
+ .log('writing coverage file to ' + fileName + '/' + fileName + '-coverage.js')
.write(path.join(buildDir, fileName, fileName + '-coverage.js'))
.run(function (err, result) {
if (err) {
@@ -606,7 +606,12 @@ var build = function (mod, name, options, callback) {
exports.copy(mod, name, stack.add(noop));
}
- stack.done(callback);
+ stack.done(function() {
+ if (!stack.complete) {
+ stack.complete = true;
+ callback();
+ }
+ });
};
var exec = function (exec, name, callback) {

0 comments on commit 93a2099

Please sign in to comment.