Merge branch 'puglyfe-aggregate-errors'

* Adds support for AggregateError
* Merges #2093 from @puglyfe
* Fixes #2063
This commit is contained in:
Steve Gravrock
2026-02-07 16:01:06 -08:00
4 changed files with 279 additions and 2 deletions

View File

@@ -4003,7 +4003,8 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
'lineNumber',
'column',
'description',
'jasmineMessage'
'jasmineMessage',
'errors'
];
function ExceptionFormatter(options) {
@@ -4069,6 +4070,18 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
lines = lines.concat(substack);
}
if (Array.isArray(error.errors)) {
error.errors.forEach((aggregatedError, index) => {
if (aggregatedError instanceof Error) {
const substack = this.stack_(aggregatedError, {
messageHandling: 'require'
});
substack[0] = 'Error ' + (index + 1) + ': ' + substack[0];
lines = lines.concat(substack);
}
});
}
return lines;
};