mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-11 05:55:29 +00:00
feat: add claude commands
This commit is contained in:
22
dot_claude/commands/write-tests.md
Normal file
22
dot_claude/commands/write-tests.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user