React Native متعدد سطحوں پر ٹیسٹنگ کی سپورٹ کرتا ہے — unit tests (منطق)، component tests (React Native Testing Library کے ساتھ)، اور end-to-end tests (Detox کے ساتھ)۔ ایک اچھی ٹیسٹنگ حکمت عملی قابلِ اعتماری اور اعتماد میں بہتری لاتی ہے۔
Unit اور component ٹیسٹنگ (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.()).();
});
