Skip to content

Commit 84e807d

Browse files
author
Xander Dumaine
committed
Fix math when runDuration isn't set
1 parent 6b0aaf9 commit 84e807d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ TimeReporter.prototype = {
2828
},
2929

3030
report: function (prefix, data) {
31+
data.runDuration = data.runDuration || 0; // so that math doesn't break for null/undefined
3132
this.runDuration += data.runDuration;
3233
let dot = false;
3334
if (data.skipped) {

0 commit comments

Comments
 (0)