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
There is a matcher toBeCloseTo that's super useful to assert floats. But when these floats are inside objects or arrays we can't use it directly. Therefore it would be useful to have an asymmetric matcher so that we can use toEqual with it, eg:
toBeCloseTo is super useful to assert floats. but when these floats are inside of any array or object, we can access it directly. and it should belong to jest core platform
The text was updated successfully, but these errors were encountered:
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.
🚀 Feature Proposal
There is a matcher
toBeCloseTo
that's super useful to assert floats. But when these floats are inside objects or arrays we can't use it directly. Therefore it would be useful to have an asymmetric matcher so that we can usetoEqual
with it, eg:It makes sense to be included in Jest core because of the existing matcher toBeCloseTo, that would be more consistent.
Thanks!.
Motivation
t would be useful to have an asymmetric matcher so that we can use
toEqual
with it, eg:Example
it used the same algorith in
toBeCloseTo
Pitch
toBeCloseTo
is super useful to assert floats. but when these floats are inside of any array or object, we can access it directly. and it should belong to jest core platformThe text was updated successfully, but these errors were encountered: