Removed useless passed property from ThrowUnlessFailure
This commit is contained in:
@@ -1286,10 +1286,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
*
|
*
|
||||||
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
||||||
* @property {String} message - The failure message for the 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);
|
const error = new Error(result.message);
|
||||||
error.passed = result.passed;
|
|
||||||
error.message = result.message;
|
error.message = result.message;
|
||||||
error.matcherName = result.matcherName;
|
error.matcherName = result.matcherName;
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -3699,7 +3699,6 @@ describe('Env integration', function() {
|
|||||||
|
|
||||||
await env.execute();
|
await env.execute();
|
||||||
expect(thrown).toBeInstanceOf(Error);
|
expect(thrown).toBeInstanceOf(Error);
|
||||||
expect(thrown.passed).toEqual(false);
|
|
||||||
expect(thrown.matcherName).toEqual('toEqual');
|
expect(thrown.matcherName).toEqual('toEqual');
|
||||||
expect(thrown.message).toEqual('Expected 1 to equal 2.');
|
expect(thrown.message).toEqual('Expected 1 to equal 2.');
|
||||||
});
|
});
|
||||||
@@ -3753,7 +3752,6 @@ describe('Env integration', function() {
|
|||||||
|
|
||||||
await env.execute();
|
await env.execute();
|
||||||
expect(thrown).toBeInstanceOf(Error);
|
expect(thrown).toBeInstanceOf(Error);
|
||||||
expect(thrown.passed).toEqual(false);
|
|
||||||
expect(thrown.matcherName).toEqual('toBeResolvedTo');
|
expect(thrown.matcherName).toEqual('toBeResolvedTo');
|
||||||
expect(thrown.message).toEqual(
|
expect(thrown.message).toEqual(
|
||||||
"Expected a promise to be resolved to 'b' but it was resolved to 'a'."
|
"Expected a promise to be resolved to 'b' but it was resolved to 'a'."
|
||||||
|
|||||||
@@ -160,10 +160,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
*
|
*
|
||||||
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
* @property {String} matcherName - The name of the matcher that was executed for this expectation.
|
||||||
* @property {String} message - The failure message for the 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);
|
const error = new Error(result.message);
|
||||||
error.passed = result.passed;
|
|
||||||
error.message = result.message;
|
error.message = result.message;
|
||||||
error.matcherName = result.matcherName;
|
error.matcherName = result.matcherName;
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
Reference in New Issue
Block a user