# Testing Reference Jest, React Native Testing Library, and E2E testing for Expo/React Native apps. ## Setup ```bash npx expo install jest-expo @testing-library/react-native ``` ```json // package.json { "jest": { "preset": "jest-expo", "setupFilesAfterSetup": ["@testing-library/react-native/extend-expect"] } } ``` ```bash npx jest # Run all tests npx jest --watch # Watch mode npx jest --coverage # Coverage report npx jest path/to/test.tsx # Single file ``` ## React Native Testing Library ### Basic Component Test ```tsx // components/__tests__/Button.test.tsx import { render, fireEvent, screen } from "@testing-library/react-native"; import { Button } from "../Button"; describe("Button", () => { it("renders label", () => { render(