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