test
Write and run tests effectively.
Types
- Unit tests: individual functions/classes
- Integration tests: components working together
- E2E tests: complete user flows
Best practices
- Test behavior, not implementation
- One assertion concept per test
- Descriptive test names
- Arrange-Act-Assert pattern
- Mock external dependencies
- Test edge cases