Skip to content

Lesson:7 || Only owner test reverts with custom error not "FundMe__NotOwner" || #5715

Discussion options

You must be logged in to vote

@MohammadRokib Use this;

await expect(
    accountConnect.withdraw()
).to.be.revertedWithCustomError(fundMe, "FundMe__NotOwner");

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MohammadRokib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants