Exclude inherited Error properties from stack trace

These are likely to be methods or other things that aren't meaningful in
Jasmine's output.
This commit is contained in:
Steve Gravrock
2023-07-19 19:13:24 -07:00
parent 59d1c5bebb
commit 75d45efa16
2 changed files with 15 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
const result = {};
let empty = true;
for (const prop in error) {
for (const prop of Object.keys(error)) {
if (ignoredProperties.includes(prop)) {
continue;
}