Rename Suite.children_ to .children

Also removed some unit tests that were brittle, and already tested by
better, more round-trip tests.
This commit is contained in:
Sheel Choksi and Tim Jarratt
2013-10-25 10:25:50 -07:00
parent 243ff80196
commit 26581b4c91
2 changed files with 7 additions and 60 deletions

View File

@@ -13,7 +13,7 @@ getJasmineRequireObj().Suite = function() {
this.queueRunner = attrs.queueRunner || function() {};
this.disabled = false;
this.children_ = []; // TODO: rename
this.children = [];
this.result = {
id: this.id,
@@ -46,16 +46,12 @@ getJasmineRequireObj().Suite = function() {
};
Suite.prototype.addSpec = function(spec) {
this.children_.push(spec);
this.children.push(spec);
};
Suite.prototype.addSuite = function(suite) {
suite.parentSuite = this;
this.children_.push(suite);
};
Suite.prototype.children = function() {
return this.children_;
this.children.push(suite);
};
Suite.prototype.execute = function(onComplete) {
@@ -65,11 +61,10 @@ getJasmineRequireObj().Suite = function() {
return;
}
var allFns = [],
children = this.children_;
var allFns = [];
for (var i = 0; i < children.length; i++) {
allFns.push(wrapChildAsAsync(children[i]));
for (var i = 0; i < this.children.length; i++) {
allFns.push(wrapChildAsAsync(this.children[i]));
}
this.onStart(this);
@@ -91,7 +86,7 @@ getJasmineRequireObj().Suite = function() {
return function(done) { child.execute(done); };
}
};
return Suite;
};