Don't mutate suite's failedExpectations from env

This commit is contained in:
Steve Gravrock
2025-10-05 05:57:56 -07:00
parent bca56032e0
commit 2a83f5cc30
4 changed files with 21 additions and 7 deletions

View File

@@ -68,7 +68,7 @@ getJasmineRequireObj().Env = function(j$) {
if (!envOptions.suppressLoadErrors) {
installGlobalErrors();
globalErrors.pushListener(function loadtimeErrorHandler(error) {
topSuite.result.failedExpectations.push({
topSuite.addExpectationResult(false, {
passed: false,
globalErrorType: 'load',
message: error.message,