Testing React Native (Jest & RNTL)
Në shqip: Testimi në React Native
ShpjegimiSQ
Komponentët e React Native testohen me Jest dhe React Native Testing Library — i shfaq, i shtyp butonat (fireEvent.press) dhe kontrollon tekstin, njësoj si në web.
EnglishEN
React Native components are tested with Jest and React Native Testing Library — you render them, press buttons (fireEvent.press) and check the text, just like on the web.
Si ta mendosh
Si një testues që e provon aplikacionin si klient i zakonshëm.
Lexoje në anglisht
Like a tester trying the app as an ordinary customer.
Shembull kodijavascript
render(<Numeruesi />);
fireEvent.press(screen.getByText("Gol"));
expect(screen.getByText("Gola: 1")).toBeTruthy();