Problem
Zero mobile tests: no jest, no *.test.*/__tests__, no testing-library, no test script in mobile/package.json. The just-added offline system is the most concurrency-sensitive code in the app and is highly testable in isolation, yet entirely untested.
Evidence — 0 test files across ~50 source modules. Highly unit-testable: mutationQueue.ts (coalescing, the dequeue(expected) guard, clearQueue), remoteProgressRepository flushQueue branch matrix (offline-stop / 4xx-drop / 5xx-retry / stale-learn), services/streak.ts, services/dailyConcept.ts, and the apply/undo reducer.
Impact — Given the flush↔optimistic race (separate issue), the absence of even one characterization test for the pending-counter + flush interaction is the highest-leverage testing gap; regressions in this subtle logic ship straight to OTA.
Suggested direction — Add jest-expo + tests for mutationQueue, the flushQueue branch matrix, and a ProgressContext test that reproduces the “tap during flush” race. Wire into CI (separate CI issue).
Problem
Zero mobile tests: no jest, no
*.test.*/__tests__, no testing-library, notestscript inmobile/package.json. The just-added offline system is the most concurrency-sensitive code in the app and is highly testable in isolation, yet entirely untested.Evidence — 0 test files across ~50 source modules. Highly unit-testable:
mutationQueue.ts(coalescing, thedequeue(expected)guard,clearQueue),remoteProgressRepositoryflushQueuebranch matrix (offline-stop / 4xx-drop / 5xx-retry / stale-learn),services/streak.ts,services/dailyConcept.ts, and theapply/undo reducer.Impact — Given the flush↔optimistic race (separate issue), the absence of even one characterization test for the pending-counter + flush interaction is the highest-leverage testing gap; regressions in this subtle logic ship straight to OTA.
Suggested direction — Add
jest-expo+ tests formutationQueue, theflushQueuebranch matrix, and a ProgressContext test that reproduces the “tap during flush” race. Wire into CI (separate CI issue).