Removed remaining paths that pass expected and actual of expectations to reporters
This commit is contained in:
@@ -922,8 +922,6 @@ getJasmineRequireObj().Spec = function(j$) {
|
|||||||
{
|
{
|
||||||
matcherName: '',
|
matcherName: '',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
|
||||||
actual: '',
|
|
||||||
error: e
|
error: e
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
@@ -1286,23 +1284,13 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
* {@link throwUnless}. Properties of this error are a subset of the
|
* {@link throwUnless}. Properties of this error are a subset of the
|
||||||
* properties of {@link ExpectationResult} and have the same values.
|
* properties of {@link ExpectationResult} and have the same values.
|
||||||
*
|
*
|
||||||
* Note: The expected and actual properties are deprecated and may be removed
|
|
||||||
* in a future release. In many Jasmine configurations they are passed
|
|
||||||
* through JSON serialization and deserialization, which is inherently
|
|
||||||
* lossy. In such cases, the expected and actual values may be placeholders
|
|
||||||
* or approximations of the original objects.
|
|
||||||
*
|
|
||||||
* @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.
|
* @property {Boolean} passed - Whether the expectation passed or failed.
|
||||||
* @property {Object} expected - Deprecated. If the expectation failed, what was the expected value.
|
|
||||||
* @property {Object} actual - Deprecated. If the expectation failed, what actual value was produced.
|
|
||||||
*/
|
*/
|
||||||
const error = new Error(result.message);
|
const error = new Error(result.message);
|
||||||
error.passed = result.passed;
|
error.passed = result.passed;
|
||||||
error.message = result.message;
|
error.message = result.message;
|
||||||
error.expected = result.expected;
|
|
||||||
error.actual = result.actual;
|
|
||||||
error.matcherName = result.matcherName;
|
error.matcherName = result.matcherName;
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
@@ -4345,9 +4333,7 @@ getJasmineRequireObj().Expector = function(j$) {
|
|||||||
passed: result.pass,
|
passed: result.pass,
|
||||||
message: message,
|
message: message,
|
||||||
error: errorForStack ? undefined : result.error,
|
error: errorForStack ? undefined : result.error,
|
||||||
errorForStack: errorForStack || undefined,
|
errorForStack: errorForStack || undefined
|
||||||
actual: this.actual,
|
|
||||||
expected: this.expected // TODO: this may need to be arrayified/sliced
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -10720,8 +10706,6 @@ getJasmineRequireObj().Suite = function(j$) {
|
|||||||
const data = {
|
const data = {
|
||||||
matcherName: '',
|
matcherName: '',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
|
||||||
actual: '',
|
|
||||||
error: arguments[0]
|
error: arguments[0]
|
||||||
};
|
};
|
||||||
const failedExpectation = j$.buildExpectationResult(data);
|
const failedExpectation = j$.buildExpectationResult(data);
|
||||||
|
|||||||
@@ -303,8 +303,6 @@ describe('AsyncExpectation', function() {
|
|||||||
passed: true,
|
passed: true,
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -338,8 +336,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -372,8 +368,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -408,8 +402,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -428,7 +420,6 @@ describe('AsyncExpectation', function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
const actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
||||||
customAsyncMatchers: matchers,
|
customAsyncMatchers: matchers,
|
||||||
@@ -442,8 +433,6 @@ describe('AsyncExpectation', function() {
|
|||||||
passed: true,
|
passed: true,
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -465,7 +454,6 @@ describe('AsyncExpectation', function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
const actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
||||||
customAsyncMatchers: matchers,
|
customAsyncMatchers: matchers,
|
||||||
@@ -478,8 +466,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: 'default message',
|
message: 'default message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -501,7 +487,6 @@ describe('AsyncExpectation', function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
const actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
||||||
customAsyncMatchers: matchers,
|
customAsyncMatchers: matchers,
|
||||||
@@ -513,8 +498,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -536,7 +519,6 @@ describe('AsyncExpectation', function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
const actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
||||||
customAsyncMatchers: matchers,
|
customAsyncMatchers: matchers,
|
||||||
@@ -548,8 +530,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(true, {
|
expect(addExpectationResult).toHaveBeenCalledWith(true, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: true,
|
passed: true,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -574,7 +554,6 @@ describe('AsyncExpectation', function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
const addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
const actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
const expectation = jasmineUnderTest.Expectation.asyncFactory({
|
||||||
customAsyncMatchers: matchers,
|
customAsyncMatchers: matchers,
|
||||||
@@ -586,8 +565,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: "I'm a custom message",
|
message: "I'm a custom message",
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -622,8 +599,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -656,8 +631,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
@@ -692,8 +665,6 @@ describe('AsyncExpectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: jasmine.any(Error)
|
errorForStack: jasmine.any(Error)
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ describe('Expectation', function() {
|
|||||||
passed: true,
|
passed: true,
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -143,8 +141,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -177,8 +173,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -213,8 +207,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -231,8 +223,7 @@ describe('Expectation', function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addExpectationResult = jasmine.createSpy('addExpectationResult'),
|
addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.factory({
|
const expectation = jasmineUnderTest.Expectation.factory({
|
||||||
customMatchers: matchers,
|
customMatchers: matchers,
|
||||||
@@ -247,8 +238,6 @@ describe('Expectation', function() {
|
|||||||
passed: true,
|
passed: true,
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -268,8 +257,7 @@ describe('Expectation', function() {
|
|||||||
return 'default message';
|
return 'default message';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addExpectationResult = jasmine.createSpy('addExpectationResult'),
|
addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.factory({
|
const expectation = jasmineUnderTest.Expectation.factory({
|
||||||
customMatchers: matchers,
|
customMatchers: matchers,
|
||||||
@@ -283,8 +271,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: 'default message',
|
message: 'default message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -304,8 +290,7 @@ describe('Expectation', function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addExpectationResult = jasmine.createSpy('addExpectationResult'),
|
addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.factory({
|
const expectation = jasmineUnderTest.Expectation.factory({
|
||||||
customMatchers: matchers,
|
customMatchers: matchers,
|
||||||
@@ -318,8 +303,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -339,8 +322,7 @@ describe('Expectation', function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addExpectationResult = jasmine.createSpy('addExpectationResult'),
|
addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.factory({
|
const expectation = jasmineUnderTest.Expectation.factory({
|
||||||
customMatchers: matchers,
|
customMatchers: matchers,
|
||||||
@@ -353,8 +335,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(true, {
|
expect(addExpectationResult).toHaveBeenCalledWith(true, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: true,
|
passed: true,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: '',
|
message: '',
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -377,8 +357,7 @@ describe('Expectation', function() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addExpectationResult = jasmine.createSpy('addExpectationResult'),
|
addExpectationResult = jasmine.createSpy('addExpectationResult');
|
||||||
actual = 'an actual';
|
|
||||||
|
|
||||||
const expectation = jasmineUnderTest.Expectation.factory({
|
const expectation = jasmineUnderTest.Expectation.factory({
|
||||||
customMatchers: matchers,
|
customMatchers: matchers,
|
||||||
@@ -391,8 +370,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: actual,
|
|
||||||
message: "I'm a custom message",
|
message: "I'm a custom message",
|
||||||
error: undefined,
|
error: undefined,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -427,8 +404,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: customError,
|
error: customError,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -463,8 +438,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: customError,
|
error: customError,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
@@ -501,8 +474,6 @@ describe('Expectation', function() {
|
|||||||
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
expect(addExpectationResult).toHaveBeenCalledWith(false, {
|
||||||
matcherName: 'toFoo',
|
matcherName: 'toFoo',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: 'hello',
|
|
||||||
actual: 'an actual',
|
|
||||||
message: 'I am a custom message',
|
message: 'I am a custom message',
|
||||||
error: customError,
|
error: customError,
|
||||||
errorForStack: undefined
|
errorForStack: undefined
|
||||||
|
|||||||
@@ -3702,8 +3702,6 @@ describe('Env integration', function() {
|
|||||||
expect(thrown.passed).toEqual(false);
|
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.');
|
||||||
expect(thrown.actual).toEqual(1);
|
|
||||||
expect(thrown.expected).toEqual(2);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not throw when the matcher passes', async function() {
|
it('does not throw when the matcher passes', async function() {
|
||||||
@@ -3760,8 +3758,6 @@ describe('Env integration', function() {
|
|||||||
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'."
|
||||||
);
|
);
|
||||||
expect(thrown.actual).toBe(promise);
|
|
||||||
expect(thrown.expected).toEqual('b');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not throw when the matcher passes', async function() {
|
it('does not throw when the matcher passes', async function() {
|
||||||
|
|||||||
@@ -158,23 +158,13 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
* {@link throwUnless}. Properties of this error are a subset of the
|
* {@link throwUnless}. Properties of this error are a subset of the
|
||||||
* properties of {@link ExpectationResult} and have the same values.
|
* properties of {@link ExpectationResult} and have the same values.
|
||||||
*
|
*
|
||||||
* Note: The expected and actual properties are deprecated and may be removed
|
|
||||||
* in a future release. In many Jasmine configurations they are passed
|
|
||||||
* through JSON serialization and deserialization, which is inherently
|
|
||||||
* lossy. In such cases, the expected and actual values may be placeholders
|
|
||||||
* or approximations of the original objects.
|
|
||||||
*
|
|
||||||
* @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.
|
* @property {Boolean} passed - Whether the expectation passed or failed.
|
||||||
* @property {Object} expected - Deprecated. If the expectation failed, what was the expected value.
|
|
||||||
* @property {Object} actual - Deprecated. If the expectation failed, what actual value was produced.
|
|
||||||
*/
|
*/
|
||||||
const error = new Error(result.message);
|
const error = new Error(result.message);
|
||||||
error.passed = result.passed;
|
error.passed = result.passed;
|
||||||
error.message = result.message;
|
error.message = result.message;
|
||||||
error.expected = result.expected;
|
|
||||||
error.actual = result.actual;
|
|
||||||
error.matcherName = result.matcherName;
|
error.matcherName = result.matcherName;
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ getJasmineRequireObj().Expector = function(j$) {
|
|||||||
passed: result.pass,
|
passed: result.pass,
|
||||||
message: message,
|
message: message,
|
||||||
error: errorForStack ? undefined : result.error,
|
error: errorForStack ? undefined : result.error,
|
||||||
errorForStack: errorForStack || undefined,
|
errorForStack: errorForStack || undefined
|
||||||
actual: this.actual,
|
|
||||||
expected: this.expected // TODO: this may need to be arrayified/sliced
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -148,8 +148,6 @@ getJasmineRequireObj().Spec = function(j$) {
|
|||||||
{
|
{
|
||||||
matcherName: '',
|
matcherName: '',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
|
||||||
actual: '',
|
|
||||||
error: e
|
error: e
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -183,8 +183,6 @@ getJasmineRequireObj().Suite = function(j$) {
|
|||||||
const data = {
|
const data = {
|
||||||
matcherName: '',
|
matcherName: '',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
|
||||||
actual: '',
|
|
||||||
error: arguments[0]
|
error: arguments[0]
|
||||||
};
|
};
|
||||||
const failedExpectation = j$.buildExpectationResult(data);
|
const failedExpectation = j$.buildExpectationResult(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user