Refactor QueueRunner and remove references to functions that Jasmine is done with

[finishes #56030214]
This commit is contained in:
Gregg Van Hove
2018-01-11 17:19:26 -08:00
parent cf2f922e30
commit e2a191b116
6 changed files with 227 additions and 190 deletions

View File

@@ -65,6 +65,19 @@ getJasmineRequireObj().Suite = function(j$) {
this.afterAllFns.unshift(fn);
};
function removeFns(queueableFns) {
for(var i = 0; i < queueableFns.length; i++) {
queueableFns[i].fn = null;
}
}
Suite.prototype.cleanupBeforeAfter = function() {
removeFns(this.beforeAllFns);
removeFns(this.afterAllFns);
removeFns(this.beforeFns);
removeFns(this.afterFns);
};
Suite.prototype.addChild = function(child) {
this.children.push(child);
};