Just return the result directly from any and objectContaining
- They return false when they fail which means not equal.
This commit is contained in:
@@ -2241,24 +2241,15 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (a instanceof j$.Any) {
|
if (a instanceof j$.Any) {
|
||||||
result = a.jasmineMatches(b);
|
return a.jasmineMatches(b);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b instanceof j$.Any) {
|
if (b instanceof j$.Any) {
|
||||||
result = b.jasmineMatches(a);
|
return b.jasmineMatches(a);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b instanceof j$.ObjectContaining) {
|
if (b instanceof j$.ObjectContaining) {
|
||||||
result = b.jasmineMatches(a);
|
return b.jasmineMatches(a);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a instanceof Error && b instanceof Error) {
|
if (a instanceof Error && b instanceof Error) {
|
||||||
|
|||||||
@@ -64,24 +64,15 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (a instanceof j$.Any) {
|
if (a instanceof j$.Any) {
|
||||||
result = a.jasmineMatches(b);
|
return a.jasmineMatches(b);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b instanceof j$.Any) {
|
if (b instanceof j$.Any) {
|
||||||
result = b.jasmineMatches(a);
|
return b.jasmineMatches(a);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b instanceof j$.ObjectContaining) {
|
if (b instanceof j$.ObjectContaining) {
|
||||||
result = b.jasmineMatches(a);
|
return b.jasmineMatches(a);
|
||||||
if (result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a instanceof Error && b instanceof Error) {
|
if (a instanceof Error && b instanceof Error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user