Clean up TreeRunner onComplete callback

This commit is contained in:
Steve Gravrock
2025-09-06 09:42:39 -07:00
parent 98849882a2
commit 62b5698a99
2 changed files with 6 additions and 12 deletions

View File

@@ -11584,14 +11584,11 @@ getJasmineRequireObj().TreeRunner = function(j$) {
}
this.#runQueue({
// TODO: if onComplete always takes 0-1 arguments (and it probably does)
// then it can be switched to an arrow fn with a named arg.
onComplete: function() {
const args = Array.prototype.slice.call(arguments, [0]);
onComplete: maybeError => {
this.#suiteSegmentComplete(suite, suite.getResult(), () => {
done.apply(undefined, args);
done(maybeError);
});
}.bind(this),
},
queueableFns,
userContext: suite.sharedUserContext(),
onException: function() {

View File

@@ -162,14 +162,11 @@ getJasmineRequireObj().TreeRunner = function(j$) {
}
this.#runQueue({
// TODO: if onComplete always takes 0-1 arguments (and it probably does)
// then it can be switched to an arrow fn with a named arg.
onComplete: function() {
const args = Array.prototype.slice.call(arguments, [0]);
onComplete: maybeError => {
this.#suiteSegmentComplete(suite, suite.getResult(), () => {
done.apply(undefined, args);
done(maybeError);
});
}.bind(this),
},
queueableFns,
userContext: suite.sharedUserContext(),
onException: function() {