Implement TreeProcessor to solve some issues with running the suite
- execute beforeAll/afterAll once per suite instead of once per child when running focused specs/suites Fixes #773 - refuse to execute an order if it would cause a suite with a beforeAll or afterAll to be re-entered after leaving once - report children of an xdescribe similarly to how they would be reported if they were themselves x'd out Fixes #774 - only process the tree once instead of figuring it out again at each level [finishes #87545620] Fixes #776
This commit is contained in:
committed by
Chris Amavisca and Gregg Van Hove
parent
0c68cc4afc
commit
715de7aa38
@@ -40,13 +40,13 @@ getJasmineRequireObj().Spec = function(j$) {
|
||||
return this.expectationFactory(actual, this);
|
||||
};
|
||||
|
||||
Spec.prototype.execute = function(onComplete) {
|
||||
Spec.prototype.execute = function(onComplete, enabled) {
|
||||
var self = this;
|
||||
|
||||
this.onStart(this);
|
||||
|
||||
if (this.markedPending || this.disabled) {
|
||||
complete();
|
||||
if (!this.isExecutable() || enabled === false) {
|
||||
complete(enabled);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ getJasmineRequireObj().Spec = function(j$) {
|
||||
userContext: this.userContext()
|
||||
});
|
||||
|
||||
function complete() {
|
||||
self.result.status = self.status();
|
||||
function complete(enabledAgain) {
|
||||
self.result.status = self.status(enabledAgain);
|
||||
self.resultCallback(self.result);
|
||||
|
||||
if (onComplete) {
|
||||
@@ -96,8 +96,13 @@ getJasmineRequireObj().Spec = function(j$) {
|
||||
}
|
||||
};
|
||||
|
||||
Spec.prototype.status = function() {
|
||||
if (this.disabled) {
|
||||
Spec.prototype.getResult = function() {
|
||||
this.result.status = this.status();
|
||||
return this.result;
|
||||
};
|
||||
|
||||
Spec.prototype.status = function(enabled) {
|
||||
if (this.disabled || enabled === false) {
|
||||
return 'disabled';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user