Open ZiJun0819 opened 1 year ago
Thanks! Would love to see a PR with the updated dependencies and tests!
Awesome find, this solved my issue as well
well, the first argument of revertedWithCustomError
must be the contract that defines the custom error so instead of this:
fundMeConnectedContract.withdraw()
).to.be.revertedWithCustomError(
fundMeConnectedContract,
"FundMe__NotOwner"
)
})
we can do this as well:
await expect(
fundMeConnectedContract.withdraw()
).to.be.revertedWithCustomError(
fundMe,
"FundMe__NotOwner"
)
})
I think maybe due to the new version of "chai", so above code should be changed to this one