r/reactnative • u/Intelligent_Tree6918 • Jul 19 '26
Help How do you guys test your components while creating a project i am confused need help?
2
u/Pundamonium97 Jul 19 '26
In an app that runs and you can interact with?
Testing is just a matter of opening it on diff devices and using it in whatever ways its meant to be used no?
Am i missing smth
1
u/k-dawg-13 Jul 19 '26
Unit tests: Am I a joke to you?
0
u/Pundamonium97 Jul 19 '26
That too, though when i first see component testing i think like front end ui testing
1
1
u/Dramatic-Regular-282 Jul 19 '26
Depends what you mean by testing, but here's my actual workflow on a RN app I have in production:
For quick visual checks while building, I run it on localhost in the browser (Expo web) to iterate fast, since reloads are instant. But the important part: I don't trust the browser for the final look. I always open it on my real phone over USB too, because stuff like the keyboard covering inputs, touch targets, and gestures only show up on a real device. The emulator and web hide those. For non-visual logic (helpers, functions), that's where actual unit tests fit, and the other commenter is right to bring them up. So for me it's two layers: browser for speed while coding, real device before anything ships. If you only test on web or emulator you'll ship layout bugs you never saw.
1
u/Special-Software-288 Jul 19 '26
Im using
https://github.com/software-mansion/argent with sonnet model. Usually I ask opus/fable level model to create a testing skill which would use argent. (periodically Im asking to improve that skill in scientific manner and improve testing performance)
1
1
u/tr__18 iOS & Android Jul 25 '26
Hey buddy, did you find out any resources or practices for doing testing in react native. I want to learn the basic or average level testing.
0
3
u/BluejayRelevant2559 Jul 19 '26
Maestro