Skip to content

Commit

Permalink
update genesis tests as well to use the txShouldRevertWithCustomError
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Feb 27, 2023
1 parent f283ebd commit 5b855c0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/protocol/test/genesis/generate_genesis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ action("Generate Genesis", function () {

expect(owner).to.be.equal(testConfig.contractOwner);

await expect(
Bridge.processMessage(
const txPromise = (
await Bridge.processMessage(
{
id: 0,
sender: ethers.Wallet.createRandom().address,
Expand All @@ -269,9 +269,18 @@ action("Generate Genesis", function () {
data: ethers.utils.randomBytes(1024),
memo: "",
},
ethers.utils.randomBytes(1024)
ethers.utils.randomBytes(1024),
{
gasLimit: 5000000,
}
)
).to.be.revertedWith("B_FORBIDDEN");
).wait(1);

await txShouldRevertWithCustomError(
txPromise,
provider,
"B_FORBIDDEN()"
);
});

it("TokenVault", async function () {
Expand Down

0 comments on commit 5b855c0

Please sign in to comment.