Files
nick-tracker/agent_docs/testing.md
2026-01-11 07:51:30 +00:00

42 lines
654 B
Markdown

# 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