Implement revert tests for VestingWallet (#4733)

Co-authored-by: ernestognw <ernestognw@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Renan Souza
2023-11-23 20:45:45 +00:00
committed by GitHub
parent e5fb718d40
commit 330c39b662
2 changed files with 60 additions and 28 deletions

View File

@ -34,6 +34,16 @@ function shouldBehaveLikeVesting() {
released = vested;
}
});
it('should revert on transaction failure', async function () {
const { args, error } = await this.setupFailure();
for (const timestamp of this.schedule) {
await time.forward.timestamp(timestamp);
await expect(this.mock.release(...args)).to.be.revertedWithCustomError(...error);
}
});
}
module.exports = {