asmarques / chai-bignumber

Chai assertions for comparing arbitrary-precision decimals using the bignumber.js library
MIT License
14 stars 37 forks source link

Support messages in equal() and other methods #5

Open Kipriz opened 6 years ago

Kipriz commented 6 years ago

It would be great to have support of the following syntax:

expect(myBets[0]).to.be.bignumber.equal(betId, `bets list should have betId ${betId}`);

Right now I have to specify message in expect() function that is hard to read:

expect(myBets[0], `bets list should have betId ${betId}`).to.be.bignumber.equal(betId);