Ensure no message added on asym. match success
This commit is contained in:
committed by
Gregg Van Hove
parent
8dd0ad531c
commit
1db81c334d
@@ -570,9 +570,9 @@ describe("toEqual", function() {
|
||||
|
||||
it("does not report a mismatch when asymmetric matchers are satisfied", function() {
|
||||
var actual = {a: 'a'},
|
||||
expected = {a: jasmineUnderTest.any(String)},
|
||||
message = 'Expected $.a = 1 to equal <jasmine.any(String)>.';
|
||||
expected = {a: jasmineUnderTest.any(String)};
|
||||
|
||||
expect(compareEquals(actual, expected).message).toEqual('');
|
||||
expect(compareEquals(actual, expected).pass).toBe(true)
|
||||
});
|
||||
|
||||
|
||||
@@ -66,13 +66,17 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
||||
|
||||
if (asymmetricA) {
|
||||
result = a.asymmetricMatch(b, customTesters);
|
||||
diffBuilder.record(a, b);
|
||||
if (!result) {
|
||||
diffBuilder.record(a, b);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
if (asymmetricB) {
|
||||
result = b.asymmetricMatch(a, customTesters);
|
||||
diffBuilder.record(a, b);
|
||||
if (!result) {
|
||||
diffBuilder.record(a, b);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user