Skip to content

No automated tests for the mobile app (especially the offline queue / sync logic) #157

Description

@Muawiya-contact

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions