Skip to content

Commit

Permalink
✅ hardhat: handle out-of-gas revert
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed May 23, 2024
1 parent 894c5bc commit 4cd3742
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/hardhat/19_rewards_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ describe("RewardsController", function () {
});

it("AND calling allClaimable with invalid reward asset THEN the claimable amount is 0", async () => {
const claimableBalance = await rewardsController.allClaimable(alice.address, alice.address);
expect(claimableBalance).to.be.eq(0);
await expect(
rewardsController.allClaimable(alice.address, alice.address, { gasLimit: 1_000_000 }),
).to.be.revertedWithoutReason();
});
});

Expand Down

0 comments on commit 4cd3742

Please sign in to comment.