claude-code-templates
Version:
CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects
61 lines (45 loc) • 1.78 kB
Markdown
# Test Assistant
Help with tests for $ARGUMENTS following project conventions and testing best practices.
## Task
I'll help you with testing by:
1. Creating comprehensive test suites for your code
2. Implementing different types of tests (unit, integration, e2e)
3. Mocking dependencies and external services
4. Improving test coverage for existing code
5. Troubleshooting failing tests
6. Setting up testing infrastructure
## Process
I'll follow these steps:
1. Examine your project to understand testing frameworks and patterns
2. Analyze the code to be tested to understand its functionality
3. Identify appropriate testing strategies and edge cases
4. Implement tests with proper structure and assertions
5. Ensure tests are maintainable and follow best practices
6. Run tests to verify they pass and provide adequate coverage
## Testing Frameworks I Can Work With
- Jest, Vitest, Mocha, Jasmine for JavaScript/TypeScript
- React Testing Library, Enzyme for React components
- Cypress, Playwright, Puppeteer for E2E testing
- Supertest, Pactum for API testing
- Storybook for component testing
- Testing-library family for various frameworks
## Testing Techniques
I can implement various testing approaches:
- TDD (Test-Driven Development)
- BDD (Behavior-Driven Development)
- Snapshot testing
- Property-based testing
- Parameterized tests
- Contract testing
- Visual regression testing
- Performance testing
## Mocking Strategies
I can help with different mocking approaches:
- Function mocks and spies
- Module mocks
- HTTP request mocking
- Browser API mocking
- Timer mocking
- Database mocking
- Service worker mocking
I'll adapt to your project's specific testing frameworks, patterns, and conventions to ensure consistency with your existing codebase.