Suites just have children instead of separating into specs/suites

This commit is contained in:
Sheel Choksi
2013-10-24 16:35:00 -07:00
parent a1a948b8df
commit 6453ed656b
2 changed files with 4 additions and 8 deletions

View File

@@ -81,11 +81,11 @@ describe("Suite", function() {
}), }),
fakeSpec = {}; fakeSpec = {};
expect(suite.specs.length).toEqual(0); expect(suite.children_.length).toEqual(0);
suite.addSpec(fakeSpec); suite.addSpec(fakeSpec);
expect(suite.specs.length).toEqual(1); expect(suite.children_.length).toEqual(1);
}); });
it("adds suites", function() { it("adds suites", function() {
@@ -108,11 +108,11 @@ describe("Suite", function() {
} }
}); });
expect(suite.suites.length).toEqual(0); expect(suite.children_.length).toEqual(0);
suite.addSuite(anotherSuite); suite.addSuite(anotherSuite);
expect(suite.suites.length).toEqual(1); expect(suite.children_.length).toEqual(1);
}); });
it("can be disabled", function() { it("can be disabled", function() {

View File

@@ -14,8 +14,6 @@ getJasmineRequireObj().Suite = function() {
this.disabled = false; this.disabled = false;
this.children_ = []; // TODO: rename this.children_ = []; // TODO: rename
this.suites = []; // TODO: needed?
this.specs = []; // TODO: needed?
this.result = { this.result = {
id: this.id, id: this.id,
@@ -49,13 +47,11 @@ getJasmineRequireObj().Suite = function() {
Suite.prototype.addSpec = function(spec) { Suite.prototype.addSpec = function(spec) {
this.children_.push(spec); this.children_.push(spec);
this.specs.push(spec); // TODO: needed?
}; };
Suite.prototype.addSuite = function(suite) { Suite.prototype.addSuite = function(suite) {
suite.parentSuite = this; suite.parentSuite = this;
this.children_.push(suite); this.children_.push(suite);
this.suites.push(suite); // TODO: needed?
}; };
Suite.prototype.children = function() { Suite.prototype.children = function() {