small refactoring
This commit is contained in:
parent
fd3e8218d7
commit
9715eb3a2e
@ -27,12 +27,13 @@ class jasmine.HeadlessReporter
|
||||
reportRunnerStarting: (runner) ->
|
||||
@startTime = new Date()
|
||||
reportSpecResults: (spec) ->
|
||||
if spec.results().passed()
|
||||
results = spec.results()
|
||||
if results.passed()
|
||||
JHW.specPassed()
|
||||
else
|
||||
JHW.specFailed()
|
||||
failureResult = new HeadlessReporterResult(spec.getFullName())
|
||||
for result in spec.results().getItems()
|
||||
for result in results.getItems()
|
||||
do (result) =>
|
||||
if result.type == 'expect' and !result.passed_
|
||||
@failedCount += 1
|
||||
|
@ -49,13 +49,14 @@
|
||||
return this.startTime = new Date();
|
||||
};
|
||||
HeadlessReporter.prototype.reportSpecResults = function(spec) {
|
||||
var failureResult, result, _fn, _i, _len, _ref;
|
||||
if (spec.results().passed()) {
|
||||
var failureResult, result, results, _fn, _i, _len, _ref;
|
||||
results = spec.results();
|
||||
if (results.passed()) {
|
||||
return JHW.specPassed();
|
||||
} else {
|
||||
JHW.specFailed();
|
||||
failureResult = new HeadlessReporterResult(spec.getFullName());
|
||||
_ref = spec.results().getItems();
|
||||
_ref = results.getItems();
|
||||
_fn = __bind(function(result) {
|
||||
if (result.type === 'expect' && !result.passed_) {
|
||||
this.failedCount += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user