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
So, bigNumber is a common way to represent values from solidity smart contracts. However it's not easy to make comparsions between big number using expect ou assert in hardhat tests.
I opened an issue about this, but there is no straight forward way to do it. I thought that maybe using chai-bignumber but it does not work.
I opened this discussion to find ideas on how to do it. How do you guys handle comparing bigNumber in tests? Is it possible to do something as I described?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So, bigNumber is a common way to represent values from solidity smart contracts. However it's not easy to make comparsions between big number using
expect
ouassert
in hardhat tests.I would like to be able to do something like:
I opened an issue about this, but there is no straight forward way to do it. I thought that maybe using
chai-bignumber
but it does not work.I opened this discussion to find ideas on how to do it. How do you guys handle comparing bigNumber in tests? Is it possible to do something as I described?
Beta Was this translation helpful? Give feedback.
All reactions