You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
● groupResourcesByAcl › correctly groups set values together
expect(received).toEqual(expected)
Expected value to equal:
Set {"c", "a", "b"}
Received:
Set {"a", "b", "c"}
I would expect toEqual to perform comparison on the values the set contains, not the Set object. This is observable in lodash:
_.isEqual(new Set(["a","b","c"]), new Set(["c","b","a"]))
> true
It appears the equal matcher in Jest is defined in jasmine_utils, which seems to have been updated to handle sets in upstream - but the function is a bit of a wall of logic for me to feel comfortable just opening a PR with it updated. I'm also unsure if there are other places that would need to be updated for Set value comparison.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
This is a bug or feature request, depending on how you interpret the docs.
What is the current behavior?
I would expect
to pass. Instead,
repl.it reproduction
What is the expected behavior?
I would expect toEqual to perform comparison on the values the set contains, not the Set object. This is observable in lodash:
It appears the equal matcher in Jest is defined in
jasmine_utils
, which seems to have been updated to handle sets in upstream - but the function is a bit of a wall of logic for me to feel comfortable just opening a PR with it updated. I'm also unsure if there are other places that would need to be updated for Set value comparison.https://github.com/jasmine/jasmine/blob/6d0f0ed9150c2bf3d9c454b3ff464bab4119a65a/src/core/matchers/matchersUtil.js#L273-L304
The text was updated successfully, but these errors were encountered: