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

feat: hookstest.Register() #12

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Sep 11, 2024

Why this should be merged

Provides general support for registering params.Extras for the lifetime of a single test.

How this works

Instead of calling params.RegisterExtras(), tests SHOULD call hookstest.Register(). Other than accepting a testing.TB, the syntax is identical.

Note

This will clear any existing Extras registered in init() functions. Tests MUST therefore not make any assumptions about existing registration.

How this was tested

Existing tests. The functionality was abstracted out of code already under test.

@ARR4N ARR4N marked this pull request as ready for review September 11, 2024 10:45
@ARR4N ARR4N requested review from a team, darioush, ceyonur and michaelkaplan13 and removed request for a team September 11, 2024 10:45
@ARR4N ARR4N merged commit 72744ce into libevm Sep 11, 2024
1 check passed
@ARR4N ARR4N deleted the arr4n/hookstest-general-registration branch September 11, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants