Skip to content

test(store): add unit tests for PeaksContext #123 (AI-generated) - #175

Merged
GiZano merged 1 commit into
ClimbStack:mainfrom
Gheb6:feat/issue-123-peaks-context-tests
Oct 14, 2026
Merged

GiZano merged 1 commit into
ClimbStack:mainfrom
Gheb6:feat/issue-123-peaks-context-tests

Conversation

@Gheb6

@Gheb6 Gheb6 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

This pull request description was written by an AI agent.

Closes #123

Summary of Changes

  • Added unit and integration tests for src/store/PeaksContext.tsx in src/store/tests/PeaksContext.test.tsx using Jest and @testing-library/react-native.
  • Verified error handling when usePeaks is called outside PeaksProvider.
  • Verified initial data loading, loading state transitions, and error handling for storage failures.
  • Verified manual refresh with
    efreshData.
  • Verified auto-save effects for peaks and streak/hours (including error handling for failing saves).
  • Verified peak management (�ddPeak, deletePeak) and camp management (�ddCamp, oggleCamp, deleteCamp, editCamp,
    eorderCamps).
  • Verified peak completion and uncompletion state recalculations across camp toggles, additions, and deletions.
  • Verified �ddCompletedHours and activity recording behavior.
  • Achieved 100% statement, branch, function, and line coverage for src/store/PeaksContext.tsx.

AI Generation Disclosure

  • Tool / Agent: Antigravity (Google DeepMind)
  • Model: Gemini 3.8 Flash
  • AI-generated files: src/store/tests/PeaksContext.test.tsx (all lines)

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GiZano
GiZano merged commit 3868538 into ClimbStack:main Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add tests for src/store/PeaksContext.tsx

2 participants