Skip to content

Commit 1149bfc

Browse files
committed
docs
1 parent 149177e commit 1149bfc

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,30 @@ All Solidity libraries in Compose are prefixed with `Lib`.
249249

250250
## Testing
251251

252-
### Testing Requirements
252+
### Required
253253
Before submitting a pull request:
254+
- Format your code: `forge fmt`
254255
- Run all tests: `forge test`
255256
- Update gas snapshots: `forge snapshot`
256257
- Ensure your code follows the banned features list
257-
- Test your changes thoroughly
258+
- Ensure your code follows the coding style in the existing code base.
259+
260+
## Recommended
258261
- Write tests for new functionality
262+
- Test your changes thoroughly
259263
- Ensure test coverage is maintained or improved
260264

265+
If you make changes to existing functionality, please make sure that the existing tests still work for that functionality and write new tests as necessary that cover the changes you made.
266+
267+
Please note that you can submit a pull request for new functionality without tests. Another person can write tests for new functionality.
268+
269+
### When writing tests
270+
- Write comprehensive tests for all functionality
271+
- Test edge cases and error conditions
272+
- Use descriptive test names
273+
- Follow the existing test patterns in the codebase
274+
- Include gas optimization tests where relevant
275+
261276
### Running Tests
262277
```bash
263278
# Run all tests
@@ -296,16 +311,6 @@ test/
296311

297312
See [test/README.md](test/README.md) for detailed testing documentation and patterns.
298313

299-
### Test Writing Guidelines
300-
- Write comprehensive tests for all new functionality
301-
- Test edge cases and error conditions
302-
- Use descriptive test names
303-
- Follow the existing test patterns in the codebase
304-
- Include gas optimization tests where relevant
305-
- Only make a pull request with full test coverage of your code.
306-
307-
**Note**: If you don't want to write tests for new functionality then we can find someone to work with you to write the tests.
308-
309314
## Available Commands
310315

311316
### Build

0 commit comments

Comments
 (0)