[英]Using chai-as-promised and chai-bignumber together fails
The following call 以下电话
filestore.getBlockNumber.q(fileHash).should.eventually.bignumber.equal(blockNumber)
Fails with 失败了
AssertionError: expected { state: 'pending' } to be an instance of string, number or BigNumber
I can reproduce the issue, and also fix it by changing the order in which the plugins are used: 我可以重现这个问题,并通过更改插件的使用顺序来修复它:
chai.use(require('chai-bignumber'));
chai.use(require('chai-as-promised'));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.