Closed
Conversation
|
cd20caf to
0bea1e4
Compare
b1b3764 to
8a97472
Compare
Contributor
|
Hey @maurelian! This PR has merge conflicts. Please fix them before continuing review. |
8a97472 to
ce6e397
Compare
Contributor
|
Hey @maurelian! This PR has merge conflicts. Please fix them before continuing review. |
Contributor
Author
|
Closing will break up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Furthers the work of reorganizing the forge tests, which was begun in #3611.
Test organizing principles
contracts to organize the test suite similar to how mocha usesdescribe.Test naming convention
Test function names are split by underscores, into 3 or 4 parts. An example function name is
test_onlyOwner_callerIsNotOwner_reverts().The parts are:
[method]_[FunctionName]_[reason]_[success], where:[method]is eithertestortestFuzz[FunctionName]is the name of the function or higher level behavior being tested.[reason]is an optional description for the behavior being tested.[success]must be one ofsuccessorrevertsor_fails.Name validation
I also wrote a quick and dirty script which can be run to validate function names and identify ones which are not yet compliant. From within the bedrock package:
ts-node scripts/forges-test-names.ts.