Validate queueableFns

This commit is contained in:
Steve Gravrock
2025-08-23 09:03:38 -07:00
parent 8d99f27be8
commit f94d0ceda9
3 changed files with 38 additions and 0 deletions

View File

@@ -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 ||