-
Notifications
You must be signed in to change notification settings - Fork 82
Mobile Testing
How the mobile app is tested. General strategy: Testing Strategy. Part of Mobile Overview.
-
Jest 29 + Testing Library for React Native, config
jest.config.js(RN 0.81 preset,@/→src/,moduleNameMapperredirects for Amplify outputs, SVG/image/permissions/maps mocks).setupFiles: jest.setup-before-env.js;setupFilesAfterEnvincludes RN's setup and a ~23 KBjest.setup.jsof global mocks.collectCoverage: falseby default (opt-in via--coverage), reporterslcov+text-summary,maxWorkers: '50%'(CI--maxWorkers=2),forceExit: true. - Tests live in the top-level
__tests__/tree mirroringsrc/:__tests__/components/{common,forms,tasks},__tests__/features/<feature>/…, plusnavigation/,screens/,services/,store/,hooks/,theme/,utils/,integration/,localization/,config/. Shared helpers in__tests__/setup/(testUtils.tsxwith a Redux/SafeArea/Navigation render wrapper,mockTheme.ts,globalMocks.ts) — that dir is ignored bytestPathIgnorePatterns.
Target ≥ 95% statements/branches/functions/lines; any touched file must not regress; new files must hit ≥ 90% on first commit (a process mandate in apps/mobileAppYC/AGENTS.md, not a hard coverageThreshold).
Several suites render with raw react-test-renderer (ReactTestRenderer.create(<App/>) inside act(...)) rather than RTL — e.g. __tests__/App.test.tsx, integration/AppNavigator.integration.test.tsx, navigation/AuthNavigator.test.tsx, and some *.snapshot.test.tsx. These trees aren't auto-cleaned, so native timers/handles leak across tests; the config compensates with forceExit: true. The fix is unmounting/draining these raw renderer instances between tests — the root cause of #1822. Under Jest, App.tsx also swaps AsyncStorage for an in-memory storage.
.detoxrc.js (Jest runner via e2e/jest.config.js, setupTimeout: 120000; iPhone 15 simulator / Pixel_7_API_34 emulator). Specs in e2e/ (smoke.e2e.js). Scripts: e2e:build:ios / e2e:ios / e2e:build:android / e2e:android. Detox runs separately, not in standard CI.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki