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

Test helpers break compatibility with bignumber.js in tests #70

Open
abcoathup opened this issue Aug 19, 2019 · 3 comments
Open

Test helpers break compatibility with bignumber.js in tests #70

abcoathup opened this issue Aug 19, 2019 · 3 comments

Comments

@abcoathup
Copy link
Contributor

abcoathup commented Aug 19, 2019

PaulRBerg reports on Twitter that Test helpers break compatibility with bignumber.js in their tests
(all tests that had "should.be.bignumber.equal" broke)

https://twitter.com/PaulRBerg/status/1163017370434265090?s=20

@nventuro
Copy link
Contributor

Our assertions use chai-bn, which works with bn.js, because that's the one that web3 1.0 uses, and the type that truffle v5.0 returns.

I'm not aware of current libraries/frameworks using bignumber.js, we should consider supporting this use case if these exist.

@nventuro
Copy link
Contributor

nventuro commented Oct 8, 2019

@PaulRBerg I saw you mentioned you used bignumber.js as a direct dependency: is there a reason to not use bn.js (which is what web3js and truffle support)?

@PaulRBerg
Copy link

Well, it's just what I prefer to use. I find the API much better and more intuitive.

And I am aware of at least 2 other projects using bignumber.js instead of bn.js.

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

4 participants