Remove 'empty' as an option as a spec result

- Having the 'empty' state for a spec result can be considered a
breaking change to the reporter interface
- Instead, we determine if a spec has no expectations using the added
key of 'passedExpectations' in combination of the 'failedExpectations'
to determine that there a spec is 'empty'

[fixes #73741032]
This commit is contained in:
Sheel Choksi
2014-06-27 23:48:19 -07:00
parent 5f34be446c
commit f7ff47706c
6 changed files with 52 additions and 42 deletions

View File

@@ -13,7 +13,6 @@ getJasmineRequireObj().Spec = function(j$) {
this.expectationResultFactory = attrs.expectationResultFactory || function() { };
this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};
this.catchingExceptions = attrs.catchingExceptions || function() { return true; };
this.expectCalled = false;
if (!this.fn) {
this.pend();
@@ -29,7 +28,6 @@ getJasmineRequireObj().Spec = function(j$) {
}
Spec.prototype.addExpectationResult = function(passed, data) {
this.expectCalled = true;
var expectationResult = this.expectationResultFactory(data);
if (passed) {
this.result.passedExpectations.push(expectationResult);
@@ -103,10 +101,6 @@ getJasmineRequireObj().Spec = function(j$) {
return 'pending';
}
if(!this.expectCalled) {
return 'empty';
}
if (this.result.failedExpectations.length > 0) {
return 'failed';
} else {