Testing Architecture
Overview
The Equa platform uses a layered testing strategy across frontend and backend.
Test Frameworks
Frontend Testing (equa-web)
Unit Tests (Jest 29 + React Testing Library)
Source: equa-web/package.json (jest configuration)
- Framework: Jest 29 with React Testing Library 14 (migrated from Jest 26 + Enzyme in PR #465)
- Location: Colocated
*.test.ts / *.test.tsx files alongside source
- Mock pattern: Pattern library mocked via
equa-web/src/shared/mocks/patternlibMock.js
- Coverage: No explicit thresholds configured
- Test count: 52 tests passing
E2E Tests (Playwright)
Source: equa-web/e2e/
Visual Regression Tests (PR #509)
Automated screenshot comparison in CI captures key routes and compares against baseline images. Diff images are uploaded as artifacts when regressions are detected.
Running Tests
E2E tests require both the frontend (localhost:8080) and backend (localhost:3000) to be running.
Backend Testing (equa-server)
Source: equa-server/modules/ (colocated test files)
- Framework: Varies by module (some use Jest, some use native Node test runner)
- S3Client mocking: Documented in
equa-server/modules/api/README.md
- Database: Tests run against a test database (requires PostgreSQL)
Command Center Testing
Source: command-center-so/e2e/
- Framework: Playwright
- Config:
command-center-so/playwright.config.ts
- Scope: Chat interface, gateway connection, settings, error reporting
CI Pipeline
Backend (GitHub Actions validation + legacy Cloud Build path)
Source: equa-server/.github/workflows/ci.yml, equa-server/cloudbuild.yaml, equa-server/railway.toml
Frontend (GitHub Actions)
Source: equa-web/.github/workflows/ci.yml
Frontend Deployment (Railway)
Source: equa-web/railway.toml
Test Data Management
- Development: Schema sync enabled (
DATABASE_SYNC !== 'false' in development)
- Production: Schema migrations managed via TypeORM
- Seed data: No automated seed scripts found
Coverage Gaps
The following areas have limited or no test coverage:
- No explicit coverage thresholds in any repository
- No automated seed data for local development testing
- No integration test suite for cross-module interactions
- No performance/load testing infrastructure
- Limited E2E coverage relative to the frontend module surface
Recommended Improvements
- Add coverage thresholds to Jest config (target: 70% lines/branches)
- Create seed data scripts for consistent local testing
- Expand E2E test coverage to all major user flows
- Add API integration tests for endpoint validation
- Implement performance benchmarks for critical paths