Initial Ralph scaffold
This commit is contained in:
41
agent_docs/testing.md
Normal file
41
agent_docs/testing.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Testing Guide
|
||||
|
||||
## Framework
|
||||
|
||||
Jest (backend), Vitest (frontend)
|
||||
|
||||
## Test Structure
|
||||
|
||||
```
|
||||
tests/
|
||||
├── unit/ # Unit tests
|
||||
├── integration/ # Integration tests
|
||||
└── e2e/ # End-to-end tests
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
npm run test
|
||||
|
||||
# Run with coverage
|
||||
npm run test -- --coverage
|
||||
|
||||
# Run specific test file
|
||||
npm run test -- path/to/test.ts
|
||||
```
|
||||
|
||||
## Coverage Requirements
|
||||
|
||||
- Minimum 80% coverage
|
||||
- All public APIs must be tested
|
||||
- All error paths must be tested
|
||||
|
||||
## Test Patterns
|
||||
|
||||
- Arrange-Act-Assert pattern
|
||||
- One assertion per test when possible
|
||||
- Descriptive test names
|
||||
- Mock external dependencies
|
||||
Reference in New Issue
Block a user