Skip to content
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

Incorrect closeTo result #1481

Open
Tb0 opened this issue Oct 3, 2022 · 1 comment
Open

Incorrect closeTo result #1481

Tb0 opened this issue Oct 3, 2022 · 1 comment

Comments

@Tb0
Copy link

Tb0 commented Oct 3, 2022

Hello,
I've an issue with the method closeTo.

expect(1682.6).to.be.closeTo(1682.7, 0.1) returns an error ❌ while I was expecting the test to pass.

It seems to me that when you have a number with more than 3 digits this fails ❌ .

expect(168.6).to.be.closeTo(168.7, 0.1) is passing ✅ , while expect(1682.6).to.be.closeTo(1682.7, 0.1) doesn't ❌.

In the meantime, expect(1682.6).to.be.closeTo(1682.7, 0.2) is passing ✅.

Can you please tell me what's going on or if I misunderstand something?

@Tb0
Copy link
Author

Tb0 commented Mar 21, 2023

Any update on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant