React Native suporta testes em múltiplos níveis — testes unitários (lógica), testes de componentes (com React Native Testing Library), e testes end-to-end (com Detox). Uma boa estratégia de testes melhora a confiabilidade e a confiança.
Testes unitários e de componentes (Jest + Testing Library)
JEST → the standard JS test runner (unit tests for logic, functions, hooks)
REACT NATIVE TESTING LIBRARY → test components by rendering and interacting with them
(the way a user would) — query elements, fire events, assert on output
{ render, fireEvent, screen } ;
(, {
();
fireEvent.(screen.());
(screen.()).();
});
