Skip to main content
2 of 2
edited title
errata
  • 184
  • 2
  • 9

Mocha assertions not returning correctly on assert.equal with BN

Is this an issue with deep matching/object identity?

AssertionError: expected <BN: 204fce5e3e25026110000000> to equal <BN: 204fce5e3e25026110000000>

It seems strange that chai.should seems to work fine with the same vars:

// works
supplyCap.should.be.bignumber.equal(_cap);
      
// doesn't work
assert.equal(supplyCap, _cap);
errata
  • 184
  • 2
  • 9