foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat(`cheatcodes`): add ability to exclude certain custom errors and revert reason strings from failing tests

Open PaulRBerg opened this issue 2 years ago • 2 comments

Component

Forge

Describe the feature you would like

The use case is fork + fuzz tests - certain tokens like USDC have blacklists that prevent the transfer of assets between certain accounts (see lines 837 and 838 here). When Foundry fuzzes a blacklisted account, the Forge test will fail because of the following error:

Blacklistable: account is blacklisted

However, this is a false negative. The user's test should not have failed.

It would be great if there were two config options for filtering revert reason strings and custom errors.

PaulRBerg avatar Feb 04 '23 20:02 PaulRBerg