Optionally detect late promise rejections and don't report them as errors

This commit is contained in:
Steve Gravrock
2025-08-09 08:35:08 -07:00
parent 5e88fde655
commit 395ef85954
12 changed files with 991 additions and 211 deletions

View File

@@ -8,6 +8,7 @@ getJasmineRequireObj().Runner = function(j$) {
this.runableResources_ = options.runableResources;
this.queueRunnerFactory_ = options.queueRunnerFactory;
this.TreeProcessor_ = options.TreeProcessor;
this.globalErrors_ = options.globalErrors;
this.reporter_ = options.reporter;
this.getConfig_ = options.getConfig;
this.reportSpecDone_ = options.reportSpecDone;
@@ -73,7 +74,9 @@ getJasmineRequireObj().Runner = function(j$) {
return this.queueRunnerFactory_(options);
},
globalErrors: this.globalErrors_,
failSpecWithNoExpectations: config.failSpecWithNoExpectations,
detectLateRejectionHandling: config.detectLateRejectionHandling,
nodeStart: (suite, next) => {
this.currentlyExecutingSuites_.push(suite);
this.runableResources_.initForRunable(suite.id, suite.parentSuite.id);