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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user