Skip to content

Add automated coverage for API, authentication, storage, and useFetch #13

Description

@koniz-dev

Context

The current 33 tests cover the home screen, loading screen, logger, and a sample utility. The starter's API interceptor, auth persistence, AsyncStorage wrapper, and useFetch success/error/unmount behavior have no automated coverage.

Acceptance criteria

  1. Tests mock network and storage and verify request token injection plus normalized API error rejection.
  2. Tests verify login persists the expected values only after a successful response, and logout removes both auth values.
  3. Tests verify storage serialization, missing keys, and malformed stored JSON behavior.
  4. Tests verify useFetch success, failure, refetch, and no state update after unmount.
  5. npm run test:ci and npm run type-check pass.

Activity

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

Metadata

Metadata

Assignees

Labels

epic:testingJest/RNTL tests and test configurationpriority:P2Normal prioritystatus:in-progressClaimed; assignee is actively workingtaskChore, refactor, or maintenance work

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions