Suites just have children instead of separating into specs/suites
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user