Fixed global error handler stack corruption in Jasmine's own tests

This commit is contained in:
Steve Gravrock
2020-09-02 09:31:35 -07:00
parent 5a715aecee
commit 00feef8632
14 changed files with 833 additions and 985 deletions

View File

@@ -705,7 +705,8 @@ getJasmineRequireObj().Env = function(j$) {
queueRunnerFactory
);
this.execute = function(runnablesToRun) {
// Both params are optional.
this.execute = function(runnablesToRun, onComplete) {
installGlobalErrors();
if (!runnablesToRun) {
@@ -813,7 +814,11 @@ getJasmineRequireObj().Env = function(j$) {
failedExpectations: topSuite.result.failedExpectations,
deprecationWarnings: topSuite.result.deprecationWarnings
},
function() {}
function() {
if (onComplete) {
onComplete();
}
}
);
});
}