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
+6 -1
View File
@@ -6,6 +6,9 @@ getJasmineRequireObj().TreeProcessor = function() {
const nodeStart = attrs.nodeStart || function() {};
const nodeComplete = attrs.nodeComplete || function() {};
const failSpecWithNoExpectations = !!attrs.failSpecWithNoExpectations;
const detectLateRejectionHandling = !!attrs.detectLateRejectionHandling;
const globalErrors = attrs.globalErrors;
const orderChildren =
attrs.orderChildren ||
function(node) {
@@ -233,9 +236,11 @@ getJasmineRequireObj().TreeProcessor = function() {
fn: function(done) {
node.execute(
queueRunnerFactory,
globalErrors,
done,
stats[node.id].excluded,
failSpecWithNoExpectations
failSpecWithNoExpectations,
detectLateRejectionHandling
);
}
};