t.like
mishandles symbol-keyed and non-enumerable properties
#3208
Labels
t.like
mishandles symbol-keyed and non-enumerable properties
#3208
This is actually two distinct but related issues affecting
t.like
, which is effectively a concordance deep comparison of a comparable value against a selector value, where the comparable is a filtered view of the actual input with respect to the selector.t.like({}, Object.defineProperties({}, {x: {enumerable: false}}))
.Object.entries(selector)
inselectComparable
ignores symbol-keyed properties that are respected by concordance, resulting in inappropriate failure results from e.g.t.like({[Symbol.toStringTag]: 'Custom'}, {[Symbol.toStringTag]: 'Custom'})
.The text was updated successfully, but these errors were encountered: