Rename queueRunnerFactory to runQueue throughout

This commit is contained in:
Steve Gravrock
2025-08-11 23:05:56 -07:00
parent 5b06531cac
commit c15a1aaa6d
9 changed files with 174 additions and 178 deletions

View File

@@ -842,7 +842,7 @@ getJasmineRequireObj().Spec = function(j$) {
};
Spec.prototype.execute = function(
queueRunnerFactory,
runQueue,
globalErrors,
onComplete,
excluded,
@@ -925,7 +925,7 @@ getJasmineRequireObj().Spec = function(j$) {
}
runnerConfig.queueableFns.push(complete);
queueRunnerFactory(runnerConfig);
runQueue(runnerConfig);
};
Spec.prototype.reset = function() {
@@ -1651,7 +1651,7 @@ getJasmineRequireObj().Env = function(j$) {
deprecator.addDeprecationWarning(runable, deprecation, options);
};
function queueRunnerFactory(options) {
function runQueue(options) {
options.clearStack = options.clearStack || clearStack;
options.timeout = {
setTimeout: realSetTimeout,
@@ -1675,7 +1675,7 @@ getJasmineRequireObj().Env = function(j$) {
onLateError: recordLateError,
specResultCallback,
specStarted,
queueRunnerFactory
runQueue
});
topSuite = suiteBuilder.topSuite;
const deprecator = new j$.Deprecator(topSuite);
@@ -1702,7 +1702,7 @@ getJasmineRequireObj().Env = function(j$) {
j$.reporterEvents,
function(options) {
options.SkipPolicy = j$.NeverSkipPolicy;
return queueRunnerFactory(options);
return runQueue(options);
},
recordLateError
);
@@ -1713,7 +1713,7 @@ getJasmineRequireObj().Env = function(j$) {
focusedRunables: () => suiteBuilder.focusedRunables,
runableResources,
reporter,
queueRunnerFactory,
runQueue,
TreeProcessor: j$.TreeProcessor,
globalErrors,
getConfig: () => config,
@@ -8555,7 +8555,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
getJasmineRequireObj().ReportDispatcher = function(j$) {
'use strict';
function ReportDispatcher(methods, queueRunnerFactory, onLateError) {
function ReportDispatcher(methods, runQueue, onLateError) {
const dispatchedMethods = methods || [];
for (const method of dispatchedMethods) {
@@ -8593,7 +8593,7 @@ getJasmineRequireObj().ReportDispatcher = function(j$) {
}
return new Promise(function(resolve) {
queueRunnerFactory({
runQueue({
queueableFns: fns,
onComplete: resolve,
isReporter: true,
@@ -9407,7 +9407,7 @@ getJasmineRequireObj().Runner = function(j$) {
this.totalSpecsDefined_ = options.totalSpecsDefined;
this.focusedRunables_ = options.focusedRunables;
this.runableResources_ = options.runableResources;
this.queueRunnerFactory_ = options.queueRunnerFactory;
this.runQueue_ = options.runQueue;
this.TreeProcessor_ = options.TreeProcessor;
this.globalErrors_ = options.globalErrors;
this.reporter_ = options.reporter;
@@ -9460,7 +9460,7 @@ getJasmineRequireObj().Runner = function(j$) {
const processor = new this.TreeProcessor_({
tree: this.topSuite_,
runnableIds: runablesToRun,
queueRunnerFactory: options => {
runQueue: options => {
if (options.isLeaf) {
// A spec
options.SkipPolicy = j$.CompleteOnFirstErrorSkipPolicy;
@@ -9473,7 +9473,7 @@ getJasmineRequireObj().Runner = function(j$) {
}
}
return this.queueRunnerFactory_(options);
return this.runQueue_(options);
},
globalErrors: this.globalErrors_,
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
@@ -11297,7 +11297,7 @@ getJasmineRequireObj().TreeProcessor = function() {
function TreeProcessor(attrs) {
const tree = attrs.tree;
const runnableIds = attrs.runnableIds;
const queueRunnerFactory = attrs.queueRunnerFactory;
const runQueue = attrs.runQueue;
const nodeStart = attrs.nodeStart || function() {};
const nodeComplete = attrs.nodeComplete || function() {};
const failSpecWithNoExpectations = !!attrs.failSpecWithNoExpectations;
@@ -11337,7 +11337,7 @@ getJasmineRequireObj().TreeProcessor = function() {
const childFns = wrapChildren(tree, 0);
await new Promise(function(resolve) {
queueRunnerFactory({
runQueue({
queueableFns: childFns,
userContext: tree.sharedUserContext(),
onException: function() {
@@ -11507,7 +11507,7 @@ getJasmineRequireObj().TreeProcessor = function() {
}
};
queueRunnerFactory({
runQueue({
onComplete: function() {
const args = Array.prototype.slice.call(arguments, [0]);
node.cleanupBeforeAfter();
@@ -11530,7 +11530,7 @@ getJasmineRequireObj().TreeProcessor = function() {
return {
fn: function(done) {
node.execute(
queueRunnerFactory,
runQueue,
globalErrors,
done,
stats[node.id].excluded,