Include symbol properties in matcher diffs

* #1966
This commit is contained in:
Steve Gravrock
2022-05-07 13:26:15 -07:00
parent 9d80377fe3
commit 468e9577cd
7 changed files with 81 additions and 36 deletions

View File

@@ -76,15 +76,9 @@ getJasmineRequireObj().util = function(j$) {
};
util.objectDifference = function(obj, toRemove) {
var diff = {};
for (var key in obj) {
if (util.has(obj, key) && !util.has(toRemove, key)) {
diff[key] = obj[key];
}
}
return diff;
return j$.MatchersUtil.keys(obj)
.filter(key => !util.has(toRemove, key))
.map(key => [key, obj[key]]);
};
util.has = function(obj, key) {