Folded util.objectDifference into MatchersUtil

This was always an implementation detail of objectKeysAreDifferentFormatter,
and didn't really do what its name suggested.

* #1966
This commit is contained in:
Steve Gravrock
2022-05-07 14:03:26 -07:00
parent 468e9577cd
commit 9a27407d35
4 changed files with 20 additions and 76 deletions

View File

@@ -75,12 +75,6 @@ getJasmineRequireObj().util = function(j$) {
return descriptor;
};
util.objectDifference = function(obj, toRemove) {
return j$.MatchersUtil.keys(obj)
.filter(key => !util.has(toRemove, key))
.map(key => [key, obj[key]]);
};
util.has = function(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
};