Skip to content
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

Refactor tests that use expectEmit cheatcode #202

Closed
bayological opened this issue Jun 5, 2023 · 1 comment · Fixed by #203
Closed

Refactor tests that use expectEmit cheatcode #202

bayological opened this issue Jun 5, 2023 · 1 comment · Fixed by #203
Assignees

Comments

@bayological
Copy link
Member

bayological commented Jun 5, 2023

Description

A recent update to Foundry has altered the behaviour of the expectEmit cheatcode, which is breaking our current test suite. In the past, expectEmit could be called at any point before the function that would cause the event to be emitted. However, the recent update requires that expectEmit is called immediately before the triggering function.

Our existing tests that are checking for emits now fail due to this change, in order to fix our test suite we need to update all tests to place expectEmit immediately before the respective call that triggered the event.

Acceptance Criteria

  • Refactor tests to ensure that expectEmit is invoked immediately before the call that triggers the event emission
  • All tests pass
@bayological bayological converted this from a draft issue Jun 5, 2023
@bayological bayological moved this from 📝 Backlog to ⚖ Ready to Estimate in Engineering Jun 5, 2023
@bayological bayological changed the title Fix foundry expect emit calls Refactor tests that use expectEmit cheatcode Jun 5, 2023
@bayological bayological moved this from ⚖ Ready to Estimate to 📏 Needs Refinement in Engineering Jun 5, 2023
@bayological
Copy link
Member Author

Story Points: 2
See the discussion in Sprint Poker #​​12

Powered by Parabol

@bayological bayological moved this from 📏 Needs Refinement to 📝 Backlog in Engineering Jun 6, 2023
@philbow61 philbow61 moved this from 📝 Backlog to 🏗 In Progress in Engineering Jun 7, 2023
@philbow61 philbow61 self-assigned this Jun 7, 2023
@philbow61 philbow61 moved this from 🏗 In Progress to 🔬Ready for Review in Engineering Jun 7, 2023
@bayological bayological moved this from 🔬Ready for Review to 👀 In Review in Engineering Jun 7, 2023
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants