-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expect(Infinity).toBeCloseTo(Infinity) fails #7405
Comments
Mind sending a PR with this enhancement? :) |
This could be something I'd like to do |
@michaeldera Are you working on this? I'd like to do this as my first PR ✨ |
No I am not, you can go ahead and have a go at it @pbondoer |
Is really infinity close to infinity?? |
I think that was the point of the issue @Sharcoux |
Good point @Sharcoux, but I think as at a programming API level, people expect |
I have a solution for this issue ready to go, but I've noticed I did not announce my intent to solve this issue, so @pbondoer is probably on it. Even so, since I solved it, may I PR? |
@joao-conde I'd say go ahead and submit it |
Fixed by #7444 |
Hey @joao-conde, thanks for submitting the PR. I had some personal stuff to take care of and couldn't get to it. Good thing you did! 👍 |
No problem, hope everything's sorted out for you! |
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. |
For consistency it would be good if .toBeCloseTo could handle Infinity gracefully :
any number should not be close to Infinity at any precision
Infinity should be close to Infinity at any precision
any number should not be close to -Infinity at any precision
-Infinity should be close to -Infinity at any precision
-Infinity should not be close to Infinity at any precision
The text was updated successfully, but these errors were encountered: