From d333ecb5b130a6a41fff3a1b3e5c7575abce6ba5 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sat, 20 Sep 2025 16:17:02 -0700 Subject: [PATCH] Removed useless passed property from ThrowUnlessFailure --- lib/jasmine-core/jasmine.js | 2 -- spec/core/integration/EnvSpec.js | 2 -- src/core/Env.js | 2 -- 3 files changed, 6 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 8e46df32..c32bccf8 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1286,10 +1286,8 @@ getJasmineRequireObj().Env = function(j$) { * * @property {String} matcherName - The name of the matcher that was executed for this expectation. * @property {String} message - The failure message for the expectation. - * @property {Boolean} passed - Whether the expectation passed or failed. */ const error = new Error(result.message); - error.passed = result.passed; error.message = result.message; error.matcherName = result.matcherName; throw error; diff --git a/spec/core/integration/EnvSpec.js b/spec/core/integration/EnvSpec.js index ec74fc16..b9536680 100644 --- a/spec/core/integration/EnvSpec.js +++ b/spec/core/integration/EnvSpec.js @@ -3699,7 +3699,6 @@ describe('Env integration', function() { await env.execute(); expect(thrown).toBeInstanceOf(Error); - expect(thrown.passed).toEqual(false); expect(thrown.matcherName).toEqual('toEqual'); expect(thrown.message).toEqual('Expected 1 to equal 2.'); }); @@ -3753,7 +3752,6 @@ describe('Env integration', function() { await env.execute(); expect(thrown).toBeInstanceOf(Error); - expect(thrown.passed).toEqual(false); expect(thrown.matcherName).toEqual('toBeResolvedTo'); expect(thrown.message).toEqual( "Expected a promise to be resolved to 'b' but it was resolved to 'a'." diff --git a/src/core/Env.js b/src/core/Env.js index 6f3db478..ae38aca1 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -160,10 +160,8 @@ getJasmineRequireObj().Env = function(j$) { * * @property {String} matcherName - The name of the matcher that was executed for this expectation. * @property {String} message - The failure message for the expectation. - * @property {Boolean} passed - Whether the expectation passed or failed. */ const error = new Error(result.message); - error.passed = result.passed; error.message = result.message; error.matcherName = result.matcherName; throw error;