Skip to content

chore(mobile-expo): unit tests for data layer and critical hooks#358

Merged
up-tandem merged 1 commit intomainfrom
chore/97-expo-unit-tests
Mar 11, 2026
Merged

chore(mobile-expo): unit tests for data layer and critical hooks#358
up-tandem merged 1 commit intomainfrom
chore/97-expo-unit-tests

Conversation

@up-tandem
Copy link
Copy Markdown
Contributor

Summary

  • Extract loadExperience from useExperience hook for direct testability (no rendering library needed)
  • Add 10 tests covering fetch routing (watchHome vs by-slug), fallback logic, and error propagation
  • Add Testing section to README with commands and conventions
  • All acceptance criteria from chore(mobile-expo): Unit tests for data layer and critical components #97 verified (14 test suites, 107 tests)

Resolves #97

Acceptance criteria checklist

  • Data layer tests: fetch paths covered (experienceService.test.ts — 8 tests)
  • Mapping tests for all 10 section types (sectionMapper.test.ts — 17 tests)
  • Nested content tests: Section→content, Container→slots→content (sectionMapper.test.ts)
  • MediaCollection variant tests (all 5) (MediaCollectionRenderer.test.tsx)
  • SectionDispatcher dispatch tests (SectionDispatcher.test.tsx — 11 tests)
  • useExperience load logic tests (useExperience.test.ts — 10 tests)
  • Tests run in CI (jest via pnpm test)
  • README updated with how to run tests

Contracts Changed

No

Regeneration Required

No

Validation

Test Suites: 14 passed, 14 total
Tests:       107 passed, 107 total
Lint:        0 warnings

🤖 Generated with Claude Code

Extract loadExperience from the hook for testability.
Add 10 tests covering fetch routing, fallback logic, and error propagation.
Add Testing section to README with test commands and conventions.

Resolves #97

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 11, 2026

Warning

Rate limit exceeded

@up-tandem has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1122b612-96f0-4ba2-b2e6-2b7bb061559c

📥 Commits

Reviewing files that changed from the base of the PR and between 79726af and b91a75f.

📒 Files selected for processing (3)
  • mobile/expo/README.md
  • mobile/expo/src/hooks/useExperience.test.ts
  • mobile/expo/src/hooks/useExperience.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/97-expo-unit-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@up-tandem up-tandem merged commit 32dc1c0 into main Mar 11, 2026
17 checks passed
@up-tandem up-tandem deleted the chore/97-expo-unit-tests branch March 11, 2026 01:32
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.

chore(mobile-expo): Unit tests for data layer and critical components

2 participants