Skip to content

added test naming conventions#19

Open
mgretzke wants to merge 1 commit intomainfrom
contributing/markg
Open

added test naming conventions#19
mgretzke wants to merge 1 commit intomainfrom
contributing/markg

Conversation

@mgretzke
Copy link

@mgretzke mgretzke commented Jul 8, 2025

Pull Request

Description

Adding some test naming convention

@mgretzke mgretzke requested a review from a team as a code owner July 8, 2025 14:46
## Testing

The following testing practices should be followed when writing unit tests for new code. All functions, lines and branches should be tested to result in 100% testing coverage. Fuzz parameters and conditions whenever possible. Extremes should be tested in dedicated edge case and corner case tests. Invariants should be tested in dedicated invariant tests.
The following testing practices should be followed when writing unit tests for new code:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test naming conventions

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

come back and expand the testing conventions


Tests should follow clear naming principles to easily understand the purpose of the test:
- The test itself (or the contract of the test) should include the name of the function it is testing.
- When a test checks for a revert, the test name should start with `test_revert_` or `testRevert`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about when you want to test that it reverts with a specific error?

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.

3 participants