mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
23 lines
877 B
Markdown
23 lines
877 B
Markdown
# Test Implementation
|
|
|
|
Implement or update the tests for the code changes.
|
|
|
|
## Implementing Tests
|
|
|
|
1. Check for staged changes with (`git status`).
|
|
If no changes are staged, review appropriate files.
|
|
2. Review existing unit tests for changed functionality.
|
|
3. Identify the functionality that needs testing.
|
|
4. Write new tests or update existing ones to cover the changes.
|
|
5. Ensure tests are comprehensive, covering edge cases and error handling.
|
|
6. Run the tests to verify they pass with the current code.
|
|
|
|
## Best practices
|
|
|
|
- Test folder structure should mirror the source code structure
|
|
- Write tests that cover both positive and negative cases
|
|
- Ensure tests are isolated and do not depend on external state
|
|
- Use descriptive names for test functions
|
|
- Keep tests small and focused on a single functionality
|
|
- Use fixtures or setup methods to prepare the test environment
|