Question 1. What are the types of testing, and why are they used?

Unit Test

Integration Test

E2E Test (End-to-End)

👉 Tests provide confidence, catch regressions, and improve reliability.


Question 2. What is React Testing Library (RTL)?

How it Works

  1. render() renders the component in a virtual DOM.