mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
628 B
628 B
Testing Conventions
Test stack
- Test framework: Jest with the
react-nativepreset - Test environment setup:
jest-setup.ts - Auto-cleanup is configured from
src/index.tsunless explicitly skipped
Test location and coverage
- Library tests are typically colocated under
src/**/__tests__ - Coverage is collected from
srcand excludes test files
Test organization
- Use
describeblocks to group tests by theme. - Do not put all tests into a single
describe. - Avoid nested
describeblocks. - If a
describewould contain only one test, make that test top-level instead. - Prefer
testoverit.