I know that we can use closeTo
chai matcher like this:
expect(BigNumber.from(100)).to.be.closeTo(BigNumber.from(101), 10);
And we can test whether a transaction emits an event with specific arguments like this:
await expect(contract.addAddress("street", "city")).to.emit(contract, 'AddAddress').withArgs("street", "city");
But how can we use closeTo
matcher with to.emit.
so that we can check whether transaction emits an event with specific arguments that are close to some value?
Reference: https://ethereum-waffle.readthedocs.io/en/latest/matchers.html