-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meta: new cheatcodes and cheatcode enhancements #876
Comments
Another issue we should investigate (not sure if it makes sense): #824 Quality of life issues:
|
|
Ah yea I like that, more flexibility than a flag that applies to the full test suite 👌 |
|
Please, add |
|
Please open up issues regarding all of the features listed above so we can track them separetely |
Another nice addition would be |
Closing this tracking issue in favor of #4439 |
Component
Forge
Describe the feature you would like
Aggregating a list of new cheatcodes and improvements to existing cheatcodes that have been requested in other issues:
vm.not
cheat code. When called immediately before (or after?)expectEmit
orexpectCall
it modifies that cheat code so the event/call is expected not to be present. Alternatively,expectNoEmit
orexpectNoCall
would work. feat(cheatcodes): add negative assertions forexpectEmit
andexpectRevert
usingcount
syntax #509expectEmit
to be declared after the call emitting the event, instead of the current workflow which requires it to be declared before. If we have to choose only allowing it to be declared before or after, my preference would be after, because it allows you to read updated state from the call and use those values as the event args, as explained in inline / asymmetric matchers #512 (comment)mockCall
,expectCall
, andexpectRevert
(andexpectEmit
?) to work for JUMPs (currently they only work for calls). This has been discussed in bug:mockCall
not working as expected #432 andexpectRevert
cheat code doesn't work for internal calls #864expectEmit
matcher fails, specify which topics or data did not match: feat(cheatcodes
): specify mis-matched fields onexpectEmit
failure #592expectEmit
issues described in Issues with expectEmit with mismatched topics and low level call #760getNonce
andsetNonce
cheatcodes #554captureLogs
andgetLogs
cheatcodes (similar torecords
andaccesses
) to support getting values of emitted events #543vm.roll
should update how RPC queries behave when forking: When testing against a fork,vm.roll
does not change RPC query block #939expectEmit
error message: misleading error message on failed expectEmit cheat code #908expectRevert
with no bytes to assert that any revert should happen: vm.expectRevert should support an empty signature to catch reverts with no message #885expectEmit
/expectCall
to only check the next call, and not all subsequent calls: bug: expectEmit and expectCall don't only check the next call #1745expect*
edge cases / bugs? Forge doesn't work with multiple "vm.expectRevert" when testing free functions #3723 (comment)Additional context
No response
The text was updated successfully, but these errors were encountered: