@@ -161,6 +161,15 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
);
|
||||
};
|
||||
|
||||
j$.isURL = function(obj) {
|
||||
return (
|
||||
obj !== null &&
|
||||
typeof obj !== 'undefined' &&
|
||||
typeof jasmineGlobal.URL !== 'undefined' &&
|
||||
obj.constructor === jasmineGlobal.URL
|
||||
);
|
||||
};
|
||||
|
||||
j$.isDataView = function(obj) {
|
||||
return (
|
||||
obj !== null &&
|
||||
|
||||
@@ -475,6 +475,10 @@ getJasmineRequireObj().MatchersUtil = function(j$) {
|
||||
diffBuilder.recordMismatch();
|
||||
return false;
|
||||
}
|
||||
} else if (j$.isURL(a) && j$.isURL(b)) {
|
||||
// URLs have no enumrable properties, so the default object comparison
|
||||
// would consider any two URLs to be equal.
|
||||
return a.toString() === b.toString();
|
||||
} else {
|
||||
// Objects with different constructors are not equivalent, but `Object`s
|
||||
// or `Array`s from different frames are.
|
||||
|
||||
Reference in New Issue
Block a user