Validate queueableFns
This commit is contained in:
@@ -37,6 +37,17 @@ getJasmineRequireObj().QueueRunner = function(j$) {
|
||||
function QueueRunner(attrs) {
|
||||
this.id_ = nextid++;
|
||||
this.queueableFns = attrs.queueableFns || [];
|
||||
|
||||
for (const f of this.queueableFns) {
|
||||
if (!f) {
|
||||
throw new Error('Received a falsy queueableFn');
|
||||
}
|
||||
|
||||
if (!f.fn) {
|
||||
throw new Error('Received a queueableFn with no fn');
|
||||
}
|
||||
}
|
||||
|
||||
this.onComplete = attrs.onComplete || emptyFn;
|
||||
this.clearStack =
|
||||
attrs.clearStack ||
|
||||
|
||||
Reference in New Issue
Block a user