Add time reporting.
This commit is contained in:
parent
8ba804e299
commit
bed9e118b6
@ -47,6 +47,8 @@ jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
||||
}
|
||||
parentDiv.appendChild(suiteDiv);
|
||||
}
|
||||
|
||||
this.startedAt = new Date();
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
||||
@ -54,6 +56,7 @@ jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
||||
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
||||
this.runnerDiv.setAttribute("class", className);
|
||||
var message = results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
||||
message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
|
||||
this.runnerMessageSpan.replaceChild(this.document.createTextNode(message), this.runnerMessageSpan.firstChild);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user