Production-grade React Native testing CLI for Jest + React Native Testing Library, now with API-first AI generation.
- API-first workflow is now the default.
initruns setup automatically.generateruns full pipeline: scan + API check + per-file AI test generation.- Large files are chunked automatically for free-tier model limits.
- Terminal progress is shown per file with final response/generated counters.
- Reliability improvements include timeout, retries, and failed-file rerun mode.
Built with FastAPI, hosted on Hugging Face Spaces.
Uses LLaMA 3.3 70B via Groq for fast inference.
Send any React Native component as plain text to /generate-tests and get:
- component summary
- key test scenarios
- full Jest + React Native Testing Library test file
System prompt is engineered to cover:
- rendering
- interactions
- state changes
- async behavior
- edge cases
- accessibility
- remove repetitive RN Jest setup pain
- standardize test scaffolding across projects
- speed up test writing without blocking manual refinement
npm i -g react-native-testsmithOr inside a project:
npm i -D react-native-testsmithreact-native-testsmith init
react-native-testsmith generate
react-native-testsmith generate --failed-only
react-native-testsmith doctor
react-native-testsmith doctor --json- Go to your React Native app
cd mobileApp- Initialize config + Jest setup
react-native-testsmith init- Run full AI generation pipeline
react-native-testsmith generate- Retry only failed files if needed
react-native-testsmith generate --failed-onlyRN_TESTSMITH_API_URL(optional override for default API endpoint)RN_TESTSMITH_API_KEY(optional auth token)RN_TESTSMITH_API_CHUNK_SIZE(default:12000)RN_TESTSMITH_API_TIMEOUT_MS(default:120000)RN_TESTSMITH_API_RETRIES(default:2)RN_TESTSMITH_API_BACKOFF_MS(default:2000)
generatescans.tsx/.jsx/.ts/.jsincluding rootApp.ts/js/tsx/jsx- test files mirror source structure under
__tests__ - failed API files are saved to
.react-native-testsmith/failed-files.json
I built this CLI solo.
I have tried to make it production-level ready, but there may still be issues.
I am very open to:
- bug reports
- feature discussions
- architecture suggestions
I want to turn this into a broader testing ecosystem, not just a CLI.
Why sponsorship matters:
- host models on our own infrastructure
- use more efficient and stronger models
- improve reliability and throughput
- add richer workflows beyond test scaffolding
If you are interested in collaborating or sponsoring, please open an issue titled:
CollaborationSponsorship
For shared commits, use a Co-authored-by: Name <email> trailer in the message body so GitHub attributes work to every author.
#ReactNative #Jest #Testing #ReactNativeTestingLibrary #FastAPI #HuggingFace #Groq #OpenSource #DevTools #TypeScript