React Native รองรับการทดสอบหลายระดับ — unit test (ตรรกะ), component test (ด้วย React Native Testing Library) และ end-to-end test (ด้วย Detox) กลยุทธ์การทดสอบที่ดีช่วยเพิ่มความน่าเชื่อถือและความมั่นใจ
Unit และ component testing (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.()).();
});
