tronbox
Version:
TronBox - Simple development framework for Tron
1 lines • 538 B
JavaScript
var BigNumber=require("bignumber.js");module.exports=function(chai){var assert=chai.assert;chai.Assertion.addProperty("address",function(){this.assert(this._obj.length===42,"expected #{this} to be a 42 character address (0x...)","expected #{this} to not be a 42 character address (0x...)");var number=BigNumber(this._obj);this.assert(number.equals(0)===false,"expected address #{this} to not be zero","you shouldn't ever see this.")});assert.isAddress=function(val,exp,msg){return new chai.Assertion(val,msg).to.be.address}};
;