Test Stack
Orquestra uses:- Bun Test - Fast, built-in test runner
- TypeScript - Type checking for compile-time safety
- ESLint - Linting for code quality
- GitHub Actions - Automated CI/CD pipeline
Running Tests Locally
Unit Tests
Run the test suite:Test Output
Type Checking
Run TypeScript compiler to check types across all packages:Type Check Individual Packages
Common Type Errors
Missing return type:Linting
Run ESLint to check code quality:Common Lint Issues
Unused variables:Code Formatting
Format code with Prettier:Writing Tests
Test Structure
Organize tests withdescribe and it blocks:
Unit Tests
Test individual functions in isolation:Integration Tests
Test component interactions:Test Best Practices
Arrange-Act-Assert pattern:CI/CD Pipeline
Orquestra uses GitHub Actions for automated testing and deployment.CI Checks
Every pull request runs these checks:1. Lint & Type Check
2. Test
3. Build
Workflow Triggers
CI runs on:- Push to main/develop: Full CI + deployment
- Pull requests: Full CI (no deployment)
- Manual trigger: Via GitHub Actions UI
Database Migrations
Separate workflow for database changes:migrations/ change.
Local Development Workflow
Recommended workflow before committing:Debugging Failed Tests
View Detailed Output
Add Debug Logging
Check CI Logs
If tests pass locally but fail in CI:- Go to your PR on GitHub
- Click “Details” next to failed check
- Review the full log output
- Look for environment-specific issues (paths, dependencies, etc.)
Test Coverage
While Orquestra doesn’t enforce strict coverage percentages, aim to:- Test all public APIs
- Test error cases and edge cases
- Test integration between components
- Test critical business logic thoroughly
- Authentication and authorization
- Data validation
- API endpoints
- Database operations
- IDL parsing and transformation
Performance Testing
For performance-critical code:Continuous Improvement
- Add tests when fixing bugs
- Improve tests when refactoring
- Keep tests simple and focused
- Update tests when requirements change
- Remove obsolete tests
Consistent testing ensures Orquestra remains stable, reliable, and maintainable as it grows.