VibeFast
08 testing and quality

Unit Testing Guide

Practical notes for writing Jest + RTL tests in the VibeFast monorepo.

Where the tests live

  • Expo/React Native components ship tests in apps/native/src/**/__tests__ next to the implementation.
  • Convex helpers and actions are tested via Vitest inside packages/backend/convex.
  • Shared helpers live under apps/native/src/lib/test-utils and wrap the Convex provider, theme, and navigation so your tests stay focused on real interactions.

How to add a test

  1. Copy the component to test and drop a sibling __tests__/<component>.test.tsx file.
  2. Render the component via the shared setup helper (it injects providers, theming, and navigation). Use screen + user from @testing-library/react-native to interact with the UI.
  3. Assert only observable behavior (labels, button presses), not internal state. The goal is to prove the user sees the right thing and the right callbacks fire.
  4. Run pnpm test:frontend to verify your test before committing.

Found an issue or bug in the docs?

Help me improve! If you spot any errors, typos, or have suggestions, please let me know.

Reach out on X/Twitter @zafarbuildzz

On this page