Testing
Testing infrastructure provided per platform — frameworks, test utilities, CI integration, and mock capabilities out of the box.
Per-Platform Overview
| Flutter | Angular | React (Web) | React Native | |
|---|---|---|---|---|
| Unit Test Framework | Flutter test (package:test) | Jest (jest-preset-angular) in product apps; Karma + Jasmine in sdks-angular | Vitest | Vitest (shared) |
| Component Testing | Widget tests | Jest + Angular Testing Library | React Testing Library | React Native Testing Library |
| E2E | — | Cypress 7.5 | — | — |
| Test Runner | melos run test (all packages) | nx run-many --target=test (cached) | turbo run test (cached) | turbo run test (shared) |
| CI Integration | GitHub Actions | Cloud Build + GitHub Actions | GitHub Actions + Firestore emulator | GitHub Actions |
| Mock Mode | — | — | MockRepository for offline dev | — |
| Visual Regression | — | — | Chromatic (Storybook) | — |
Flutter
Melos orchestrates tests across all 26 packages:
melos run test # Run tests across all packages
melos run analyze # Static analysis across all packagesEach SDK package contains its own test suite co-located with the source. The e11_core package provides shared test utilities and base classes.
Angular
sdks-angular uses Karma + Jasmine with Nx remote caching — tests that haven’t changed since the last run are skipped automatically:
nx run-many --target=test --parallel # Cached, only runs affected
nx affected:test # Only tests affected by changesProduct apps use Jest with @angular-builders/jest and jest-preset-angular for faster unit tests, plus Cypress for E2E.
Code quality enforcement runs on every commit:
- ESLint (
@angular-eslint+@typescript-eslint) - Prettier via
lint-staged - Commitizen + commitlint for conventional commits
- Husky git hooks
React / React Native
Vitest runs with the Firestore emulator in CI for integration-grade tests:
turbo run test # Dependency-aware, cached
turbo run lint # ESLint + Prettier| Capability | What’s Provided |
|---|---|
| Mock mode | MockRepository swaps BaseFirestoreRepository — fully offline frontend development without backend |
| Test utilities | @engineering11/testing-frontend-api — mock factories and test helpers |
| Visual regression | Chromatic integration with Storybook (38 stories with a11y testing) |
| CI pipeline | test.yml runs Vitest + Firestore emulator on every PR |
| Lint pipeline | lint-and-format.yml runs ESLint + Prettier on every PR |
The mock mode is particularly valuable — you can iterate on UI without any backend dependencies by setting NEXT_PUBLIC_USE_MOCKS=true.
CI Test Infrastructure
Every platform includes test execution in its CI pipeline:
| Platform | Pipeline | What Runs |
|---|---|---|
| Flutter | build-deploy.yml | melos run analyze + melos run test before build |
| Angular (SDKs) | Nx CI | Cached parallel tests, only affected packages |
| Angular (App) | Cloud Build | Jest unit tests + Cypress E2E |
| React | test.yml | Vitest + Firestore emulator |
| React | lint-and-format.yml | ESLint + Prettier |
| React | Storybook CI | Chromatic visual regression on PR |
What You Get
- Test frameworks pre-configured per platform
- CI pipelines that run tests on every PR
- Shared test utilities and mock factories
- Cached test execution (Nx/Turborepo) — only re-run what changed
- Code quality enforcement (linting, formatting, conventional commits)
- Mock mode for offline development (React)
- Visual regression testing via Storybook + Chromatic (React)
What You Build on Top
- Unit tests for product-specific services and business logic
- Component tests for product-specific UI
- E2E test scenarios for product workflows
- Test fixtures and factories for product domain models
Next Steps
- Build & Deployment — Full CI/CD pipeline details
- Platforms — Platform-specific testing details