Refactor.
This commit is contained in:
parent
e30b99e7b3
commit
2d138f1cfa
14
src/Suite.js
14
src/Suite.js
|
@ -51,15 +51,15 @@ jasmine.Suite.prototype.results = function() {
|
||||||
return this.queue.results();
|
return this.queue.results();
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.add = function(block) {
|
jasmine.Suite.prototype.add = function(suiteOrSpec) {
|
||||||
this.children_.push(block);
|
this.children_.push(suiteOrSpec);
|
||||||
if (block instanceof jasmine.Suite) {
|
if (suiteOrSpec instanceof jasmine.Suite) {
|
||||||
this.suites_.push(block);
|
this.suites_.push(suiteOrSpec);
|
||||||
this.env.currentRunner().addSuite(block);
|
this.env.currentRunner().addSuite(suiteOrSpec);
|
||||||
} else {
|
} else {
|
||||||
this.specs_.push(block);
|
this.specs_.push(suiteOrSpec);
|
||||||
}
|
}
|
||||||
this.queue.add(block);
|
this.queue.add(suiteOrSpec);
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.Suite.prototype.specs = function() {
|
jasmine.Suite.prototype.specs = function() {
|
||||||
|
|
Loading…
Reference in New Issue