better reporting
This commit is contained in:
parent
b53c4c56f7
commit
e761616830
@ -234,8 +234,9 @@ void HeadlessSpecRunner::finishSuite(const QString &duration, const QString &tot
|
||||
std::cout << "PASS: ";
|
||||
}
|
||||
|
||||
std::cout << qPrintable(total) << " tests, " << qPrintable(failed) << " failures, " << qPrintable(duration) << " secs." << std::endl;
|
||||
std::cout << qPrintable(total) << " tests, " << qPrintable(failed) << " failures, " << qPrintable(duration) << " secs.";
|
||||
clear();
|
||||
std::cout << std::endl;
|
||||
|
||||
isFinished = true;
|
||||
}
|
||||
|
@ -22,9 +22,10 @@ class jasmine.HeadlessReporter
|
||||
do (result) =>
|
||||
result.print()
|
||||
|
||||
JHW.finishSuite(@totalDuration, @length, @failedCount)
|
||||
JHW.finishSuite(@totalDuration / 1000.0, @length, @failedCount)
|
||||
reportRunnerStarting: (runner) ->
|
||||
reportSpecResults: (spec) ->
|
||||
@totalDuration += (new Date() - spec.startTime)
|
||||
if spec.results().passed()
|
||||
JHW.specPassed()
|
||||
else
|
||||
@ -37,9 +38,6 @@ class jasmine.HeadlessReporter
|
||||
failureResult.results.push(result.message)
|
||||
@results.push(failureResult)
|
||||
reportSpecStarting: (spec) ->
|
||||
# something here
|
||||
spec.startTime = new Date()
|
||||
reportSuiteResults: (suite) ->
|
||||
suite.startTime ?= new Date()
|
||||
@totalDuration += (new Date() - suite.startTime) / 1000.0;
|
||||
|
||||
@length += suite.specs().length
|
||||
|
@ -41,11 +41,12 @@
|
||||
result = _ref[_i];
|
||||
_fn(result);
|
||||
}
|
||||
return JHW.finishSuite(this.totalDuration, this.length, this.failedCount);
|
||||
return JHW.finishSuite(this.totalDuration / 1000.0, this.length, this.failedCount);
|
||||
};
|
||||
HeadlessReporter.prototype.reportRunnerStarting = function(runner) {};
|
||||
HeadlessReporter.prototype.reportSpecResults = function(spec) {
|
||||
var failureResult, result, _fn, _i, _len, _ref;
|
||||
this.totalDuration += new Date() - spec.startTime;
|
||||
if (spec.results().passed()) {
|
||||
return JHW.specPassed();
|
||||
} else {
|
||||
@ -65,15 +66,10 @@
|
||||
return this.results.push(failureResult);
|
||||
}
|
||||
};
|
||||
HeadlessReporter.prototype.reportSpecStarting = function(spec) {};
|
||||
HeadlessReporter.prototype.reportSpecStarting = function(spec) {
|
||||
return spec.startTime = new Date();
|
||||
};
|
||||
HeadlessReporter.prototype.reportSuiteResults = function(suite) {
|
||||
var _ref;
|
||||
if ((_ref = suite.startTime) != null) {
|
||||
_ref;
|
||||
} else {
|
||||
suite.startTime = new Date();
|
||||
};
|
||||
this.totalDuration += (new Date() - suite.startTime) / 1000.0;
|
||||
return this.length += suite.specs().length;
|
||||
};
|
||||
return HeadlessReporter;
|
||||
|
Loading…
Reference in New Issue
Block a user