Skip to main content
The mobile app and test-enabled packages use Jest through Nx. The shared Jest preset enforces 100% coverage thresholds for branches, functions, lines, and statements when coverage is collected.

Workspace tests

Run all test targets with the Nx cache disabled:
Run the tagged domain/shared package test set with coverage:
Run the mobile Jest target with coverage:

Test one project

The test:unit wrapper forwards its trailing target and flags to nx run:
The equivalent direct Nx form is:
Always disable watch mode in automation so the process terminates.

Run all tests directly through Nx

Test layout

Test files match either of these Jest patterns:
Projects with tests typically define:
  • jest.config.ts
  • tsconfig.spec.json
  • an Nx test target in project.json
Coverage output is written beneath coverage/ according to each project target’s configured output path.

Completion gate

verify runs affected lint, typecheck, and test targets. Because it is affected-only, use a targeted project test or the all-project command when you need explicit full-suite coverage.

Writing reliable tests

  • Test observable state and behavior rather than implementation details.
  • Prefer actual Zustand state transitions when testing stores.
  • Inject network dependencies so tests can replace them with typed mocks.
  • Cover error and boundary paths as well as successful paths.
  • Keep fixtures deterministic and local to the project that owns the behavior.