I discovered some inconsistent behavior in the toEqual matcher in Jest; when comparing to objects, it ignores non-enumerable properties, but only if they are not symbols. This leads to quite inconsistent behavior:
The cause of the issue can be found here. To find the string properties the for..in loop is used which ignores non-enumerable properties, but for the symbolic properties getOwnPropertySymbols is used, which will include non-enumerable properties.
See link below
Non-enumerable symbolic properties should be treated the same as non-enumerable non-symbolic properties when running toEqual. Either both should be included, or excluded. Given that symbolic properties are lot more exotic, I think the behavior of string properties should be followed and non-enumerable symbolic properties should be excluded from deep equality.