Linearis currently has minimal automated testing infrastructure, with testing primarily done through manual integration testing and performance benchmarking. The project relies on TypeScript's compile-time type checking and real-world API testing against Linear's production environment.
Testing focuses on performance validation, authentication flows, and API integration correctness. All commands are tested manually with real Linear workspaces to ensure proper functionality and performance characteristics.
Command Validation - Real API testing approach used throughout development:
- Each command tested against live Linear workspace
- Authentication tested with all three methods (token flag, env var, file)
- Smart ID resolution tested with various identifier formats
Performance Testing - PERFORMANCE.md documents benchmarking approach:
- Real-world timing using
timecommand with production API - Performance regression testing for optimization validation
Compile-time Validation - TypeScript ensures type correctness:
- src/utils/linear-types.d.ts (lines 1-96) - Complete interface definitions
- All API responses validated against TypeScript interfaces
- Command parameter validation through Commander.js and TypeScript
Package.json Test Script - package.json (line 9)
pnpm test
# Output: "Error: no test specified" && exit 1No automated test framework is currently configured
Issue Operations Testing
# Test issue listing
pnpm start issues list -l 5
# Test issue reading with ID resolution
pnpm start issues read ABC-123
# Test issue creation
pnpm start issues create --title "Test Issue" --team ABC
# Test issue search with filters
pnpm start issues search "bug" --team ABC --project "Mobile App"Project Operations Testing
# Test project listing
pnpm start projects list
# Test project reading with name resolution
pnpm start projects read "Mobile App"Authentication Testing
# Test with API token flag
pnpm start --api-token <token> issues list
# Test with environment variable
LINEAR_API_TOKEN=<token> pnpm start issues list
# Test with token file
echo "<token>" > ~/.linear_api_token && pnpm start issues listBenchmark Commands - From PERFORMANCE.md examples:
# Time command execution
time pnpm start issues list -l 10
# Monitor single issue performance
time pnpm start issues read ABC-123
# Test search performance
time pnpm start issues search "test" --team ABCCurrent State - No test files present:
- No test/ or tests/ directories
- No test configuration files (jest.config.js, etc.)
- No testing dependencies in package.json
Testing Strategy - Manual and performance-focused:
- Integration testing via real API calls
- Performance regression testing via benchmarking
- Type safety via TypeScript compilation
Recommended Test Framework Setup:
- Install Jest or Vitest for Node.js testing
- Add test scripts to package.json
- Create test files in test/ directory
- Add CI/CD pipeline for automated testing
Test Areas to Cover:
- Authentication token resolution (src/utils/auth.ts)
- Smart ID resolution methods (src/utils/linear-service.ts lines 398-473)
- Command parsing and validation (src/commands/*.ts)
- Error handling and output formatting (src/utils/output.ts)
- Mock Linear API responses for unit testing
Current Benchmarks - PERFORMANCE.md documented results:
- Single issue read: ~0.9-1.1 seconds (90%+ improvement)
- List 10 issues: ~0.9 seconds (95%+ improvement)
- Create issue: ~1.1 seconds (50%+ improvement)
Monitoring Commands - For performance regression testing:
# Create performance test script
echo 'time linearis issues list -l 25' > perf-test.sh
chmod +x perf-test.sh && ./perf-test.sh