A React Native több szinten támogatja a teszteket — unit tesztek (logika), komponens tesztek (React Native Testing Library-vel), és end-to-end tesztek (Detox-szal). A jó tesztelési stratégia javítja a megbízhatóságot és a bizalmat.
Unit és komponens tesztelés (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.()).();
});
