@testing-library/react-native is a TypeScript/Jest library for testing React Native components with user-focused testing patterns.
Important
Never run git commands that create commits, push, or modify the index/history. The human stages and commits. See Agent rules.
- Package manager:
yarn(yarn@4.11.0) - Common commands:
yarn testyarn test:ciyarn typecheckyarn lintyarn format:checkyarn buildyarn validate
- Contributor guides (shared with human contributors, see also CONTRIBUTING.md):
- Architecture and API design
- Build, validation, and repo layout
- TypeScript and code style
- Testing conventions
- Native event propagation (bubbling vs direct)
- Native state for uncontrolled components
- Event dispatch (
fireEventvsuserEvent) - Accessibility model
- Async,
act, and timers - Example app regeneration
- Git, releases, and PR workflow
- Never run git commands that create commits, push, or modify the index/history. The human owns these actions.
- Forbidden commands include (non-exhaustive):
git commit,git push,git add,git rm,git mv,git restore --staged,git reset,git rebase,git merge,git cherry-pick,git stash,git commit --amend, andgit tag. - Read-only inspection is fine:
git status,git log,git diff,git show,git blame. - When conflicts or staging are involved, resolve file contents in the working tree only, then hand off to the human to stage and commit. Describe the exact commands you would run instead of running them.
- Maintain
PR.txtat the repository root using the structure from.github/PULL_REQUEST_TEMPLATE.md. - Keep
PR.txtaligned with the current branch diff relative toorigin/main. - Include tests actually run and any known validation gaps in
PR.txt. - Do not commit
PR.txt.