Skip to content

Commit 95b69fd

Browse files
committed
Coverage option in files
1 parent 25fb2f5 commit 95b69fd

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.jshintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"browser": true,
2+
"expr": true,
33
"jquery": true,
44
"node": true
55
}

lib/testrunner.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function runOne(opts, callback) {
8888
callback(null, msg.data);
8989
kill();
9090
} else if (msg.event === 'uncaughtException') {
91-
callback(_.extend(new Error, msg.data));
91+
callback(_.extend(new Error(), msg.data));
9292
kill();
9393
}
9494
});
@@ -150,10 +150,10 @@ exports.run = function(files, callback) {
150150
files = [files];
151151
}
152152

153-
if (options.coverage) coverage.setup();
153+
if (options.coverage || files[0].coverage) coverage.setup();
154154

155155
files.forEach(function(file) {
156-
var opts = _.extend({}, options, file);
156+
var opts = _.extend({}, options, file);
157157

158158
!opts.log && (opts.log = {});
159159
opts.deps = absPaths(opts.deps);

0 commit comments

Comments
 (0)