Testing Philosophy
New Expensify follows a comprehensive testing strategy:- Unit Tests: Test individual components and functions
- Integration Tests: Test feature workflows
- Performance Tests: Catch performance regressions
- Type Safety: TypeScript for compile-time checks
Running Tests
All Tests
Test Coverage
Writing Unit Tests
Component Tests
Testing with Onyx
Testing Hooks
Mocking API Calls
Testing Utilities
Custom Render with Providers
Waiting for Updates
Performance Tests
New Expensify uses Reassure for performance testing.Running Performance Tests
Testing Best Practices
1. Test Behavior, Not Implementation
2. Keep Tests Independent
3. Use Descriptive Test Names
4. Clean Up After Tests
Testing Checklist
Before submitting a PR, ensure:- All existing tests pass
- New features have tests
- Bug fixes have regression tests
- Tests are independent and repeatable
- No console errors or warnings
- Performance tests pass (if applicable)
Common Testing Patterns
Testing Async Operations
Testing Navigation
Testing Forms
Debugging Tests
View Component Output
Run Single Test
Next Steps
Pull Requests
Submit PRs with tests
Coding Standards
Follow code quality standards
Architecture
Understand what to test
Performance Tests
Performance testing guide
