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

Mocha assertions not returning correctcorrectly on assert.equal with BN

Source Link
errata
  • 184
  • 2
  • 9

Mocha assertions not returning correct 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);