Quick reference checklist for developers adding new features
-
Requirements Analysis
- Identify all user scenarios (happy path + edge cases)
- Map out component interactions and data flow
- Determine external dependencies (APIs, databases, services)
- Plan test data requirements and mocking strategy
-
Test Strategy
- Define unit test scope and coverage targets
- Identify integration points to test
- Plan end-to-end user journeys
- Consider accessibility and performance requirements
-
Basic Rendering
- Renders with default props
- Renders with all prop combinations
- Handles missing/undefined props gracefully
-
Variants & States
- Tests all visual variants (primary, secondary, etc.)
- Tests all functional states (disabled, loading, error, success)
- Tests size variations (sm, md, lg)
-
User Interactions
- Click events handled correctly
- Keyboard navigation works (Tab, Enter, Escape, Arrow keys)
- Focus management implemented
- Form submission and validation
-
Accessibility
- ARIA attributes present and correct
- Screen reader compatibility tested
- Color contrast requirements met
- Keyboard accessibility verified
-
testAccessibility()helper used
-
Technical Details
- Ref forwarding works (if applicable)
- Custom props passed through correctly
- CSS classes applied properly
- Component composition works
-
Core Functionality
- Main function logic tested with various inputs
- Return values validated for all scenarios
- Side effects properly tested
-
Error Handling
- Invalid input handled gracefully
- Appropriate errors thrown with correct messages
- Network failures handled
- Timeout scenarios covered
-
Edge Cases
- Empty data sets
- Maximum/minimum limits
- Boundary conditions
- Null/undefined values
-
State Initialization
- Correct initial state values
- Default parameters work
- Dependencies properly initialized
-
State Updates
- State changes work correctly
- Multiple state updates handled
- Async state updates managed
-
Lifecycle & Cleanup
- Effect hooks run at correct times
- Cleanup functions prevent memory leaks
- Unmounting handled properly
-
Successful Responses
- Data fetching works correctly
- Response data properly processed
- State updated correctly after API calls
-
Error Scenarios
- Network errors handled (offline, timeout)
- HTTP error status codes (400, 401, 403, 404, 500)
- Malformed response data handled
- Rate limiting scenarios
-
Authentication Integration
- Protected routes require authentication
- Tokens included in requests
- Token refresh handled
- Logout clears authentication state
-
Tenant Context
- Current tenant context properly used
- Organization switching works
- Tenant-specific data filtering
-
Permissions & Security
- Role-based access control enforced
- Row-level security policies tested
- Cross-tenant data isolation verified
-
Parent-Child Communication
- Props passed down correctly
- Callbacks trigger parent updates
- Context shared properly
-
Form Integration
- Form validation triggers correctly
- Field updates propagate
- Form submission workflows complete
-
Feature Discovery
- User can find and access the feature
- Navigation to feature works from multiple entry points
- Feature loads completely
-
Core Workflow
- Happy path workflow completes successfully
- User receives appropriate feedback at each step
- Data persists correctly throughout workflow
-
Error Recovery
- User can recover from validation errors
- Network issues handled gracefully
- User guided back to working state
-
Desktop Browsers
- Chrome/Chromium functionality verified
- Firefox compatibility confirmed
- Safari/WebKit tested
-
Mobile Testing
- Mobile Chrome tested
- Mobile Safari tested
- Responsive design works
- Touch interactions function
-
Visual Regression
- Screenshots captured for all states
- Visual changes reviewed and approved
- Color modes tested (light/dark)
-
Performance
- Page load times within acceptable limits
- Bundle size impact documented
- Memory usage monitored
-
Minimum Thresholds Met
- Branches: 80% minimum
- Functions: 80% minimum
- Lines: 80% minimum
- Statements: 80% minimum
-
Coverage Quality
- Tests actually validate behavior (not just coverage)
- Critical paths have 100% coverage
- Error paths properly tested
-
Test Independence
- Tests don't depend on each other
- Tests can run in any order
- Proper setup and teardown
-
Test Maintainability
- Tests are readable and well-documented
- Test data is realistic and meaningful
- Mocks are realistic and current
- All unit tests pass:
npm run test - Integration tests pass:
npm run test:integration - E2E tests pass:
npm run test:e2e - Coverage meets requirements:
npm run test:coverage - No accessibility violations:
npm run test:a11y - Visual tests pass:
npm run test:visual
- Linting passes:
npm run lint - Type checking passes:
npm run type-check - Bundle size acceptable:
npm run bundle:check - No console errors or warnings
- Test documentation updated
- Feature documentation includes testing notes
- Breaking changes documented
- Migration guide provided (if needed)
- All CI tests pass in GitHub Actions
- Cross-browser tests pass
- Bundle size analysis completed
- Security scans pass
- Performance benchmarks meet standards
- Feature tested in staging environment
- Edge cases verified in production-like environment
- Performance acceptable under load
- Monitoring and alerting configured
- Login/logout flows tested end-to-end
- Password reset workflow complete
- Social authentication providers work
- Session management tested
- Security vulnerabilities addressed
- Create operations tested with validation
- Read operations handle empty states
- Update operations preserve data integrity
- Delete operations include confirmation
- Bulk operations tested
- Payment flows tested with Stripe test mode
- Subscription management workflows
- Invoice generation and delivery
- Failed payment scenarios handled
- PCI compliance requirements met
- Data isolation between tenants verified
- Organization member management tested
- Invitation workflows complete
- Permission inheritance tested
- Tenant switching workflows
- ❌ Testing implementation details instead of behavior
- ❌ Writing tests that don't actually test anything
- ❌ Relying too heavily on snapshot tests
- ❌ Not testing error scenarios
- ❌ Forgetting to test accessibility
- ❌ Not mocking external dependencies properly
- ❌ Tests that depend on network conditions
- ❌ Hardcoded test data that breaks in different environments
- ❌ Not testing with realistic data volumes
- ❌ Flaky tests that pass/fail randomly
- ❌ Tests that are too slow or resource-intensive
- ❌ Not testing on different screen sizes
- ❌ Forgetting to test keyboard navigation
Your feature is ready when:
- ✅ All tests pass consistently
- ✅ Coverage meets or exceeds 80% threshold
- ✅ No accessibility violations detected
- ✅ Performance benchmarks within acceptable range
- ✅ Visual regression tests approved
- ✅ Cross-browser compatibility verified
- ✅ Documentation updated and complete
- ✅ Code review completed and approved
- ✅ CI/CD pipeline passes all checks
Remember: Quality is not negotiable. Every feature must meet these standards before it can be merged and deployed.