Fixed post-merge test failures

This commit is contained in:
Steve Gravrock
2023-03-04 14:10:05 -08:00
parent 86eddb05b4
commit 61505f4c59
3 changed files with 9 additions and 3 deletions

View File

@@ -2066,7 +2066,10 @@ getJasmineRequireObj().Env = function(j$) {
}
function callerCallerFilename() {
return new j$.StackTrace(new Error()).frames[3].file;
const frames = new j$.StackTrace(new Error()).frames;
// frames[3] should always exist except in Jasmine's own tests, which bypass
// the global it/describe layer, but don't crash if it doesn't.
return frames[3] && frames[3].file;
}
return Env;

View File

@@ -195,7 +195,7 @@ describe('SuiteBuilder', function() {
duration: null,
properties: null,
parentSuiteId: null,
filename: undefined,
filename: undefined
});
});

View File

@@ -931,7 +931,10 @@ getJasmineRequireObj().Env = function(j$) {
}
function callerCallerFilename() {
return new j$.StackTrace(new Error()).frames[3].file;
const frames = new j$.StackTrace(new Error()).frames;
// frames[3] should always exist except in Jasmine's own tests, which bypass
// the global it/describe layer, but don't crash if it doesn't.
return frames[3] && frames[3].file;
}
return Env;