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

Added compatibility with BN.js from web3 ^1.0.0 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kandrianov
Copy link

Let's make it compatible with web3.utils.BN, because web3 ^1.0.0 uses BN.js

@ameensol
Copy link

ameensol commented Dec 16, 2018

I came here to add this, but found that it isn't that straightforward to get the tests working for BN.js because BN.js doesn't support decimals, but bignumber.js does.

Also when I copied the test file to run it separately for BN.js the way the method overwriting happens in chai-bignumber I was having trouble getting both tests to work. The BigNumber tests only work when I comment out this line in the BN test file:

chai.use(require('../chai-bignumber')(BN));

I think for this to be accepted we'd need to figure out how to:

  1. test both BigNumber and BN separately in different files without interference
  2. remove all decimal test cases from the BN test file

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

Successfully merging this pull request may close these issues.

2 participants