Rename jasmineMatches to asymmetricMatch
- This should be more clear what it is for [finish #82295210]
This commit is contained in:
@@ -4,7 +4,7 @@ getJasmineRequireObj().Any = function() {
|
||||
this.expectedObject = expectedObject;
|
||||
}
|
||||
|
||||
Any.prototype.jasmineMatches = function(other) {
|
||||
Any.prototype.asymmetricMatch = function(other) {
|
||||
if (this.expectedObject == String) {
|
||||
return typeof other == 'string' || other instanceof String;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ getJasmineRequireObj().ObjectContaining = function(j$) {
|
||||
this.sample = sample;
|
||||
}
|
||||
|
||||
ObjectContaining.prototype.jasmineMatches = function(other) {
|
||||
ObjectContaining.prototype.asymmetricMatch = function(other) {
|
||||
if (typeof(this.sample) !== 'object') { throw new Error('You must provide an object to objectContaining, not \''+this.sample+'\'.'); }
|
||||
|
||||
var hasKey = function(obj, keyName) {
|
||||
|
||||
@@ -64,15 +64,15 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
||||
}
|
||||
|
||||
if (a instanceof j$.Any) {
|
||||
return a.jasmineMatches(b);
|
||||
return a.asymmetricMatch(b);
|
||||
}
|
||||
|
||||
if (b instanceof j$.Any) {
|
||||
return b.jasmineMatches(a);
|
||||
return b.asymmetricMatch(a);
|
||||
}
|
||||
|
||||
if (b instanceof j$.ObjectContaining) {
|
||||
return b.jasmineMatches(a);
|
||||
return b.asymmetricMatch(a);
|
||||
}
|
||||
|
||||
if (a instanceof Error && b instanceof Error) {
|
||||
|
||||
Reference in New Issue
Block a user