Removed useless passed property from ThrowUnlessFailure

This commit is contained in:
Steve Gravrock
2025-09-20 16:17:02 -07:00
parent 1e98a4b61b
commit d333ecb5b1
3 changed files with 0 additions and 6 deletions

View File

@@ -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;

View File

@@ -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'."

View File

@@ -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;