You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,15 +249,30 @@ All Solidity libraries in Compose are prefixed with `Lib`.
249
249
250
250
## Testing
251
251
252
-
### Testing Requirements
252
+
### Required
253
253
Before submitting a pull request:
254
+
- Format your code: `forge fmt`
254
255
- Run all tests: `forge test`
255
256
- Update gas snapshots: `forge snapshot`
256
257
- 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
258
261
- Write tests for new functionality
262
+
- Test your changes thoroughly
259
263
- Ensure test coverage is maintained or improved
260
264
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
+
261
276
### Running Tests
262
277
```bash
263
278
# Run all tests
@@ -296,16 +311,6 @@ test/
296
311
297
312
See [test/README.md](test/README.md) for detailed testing documentation and patterns.
298
313
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.
0 commit comments