React Testing Library
Multiple Choice Medium
Question
What is the core philosophy of React Testing Library?
Hint
Think about who actually uses your app — users, not developers.
Explanation
React Testing Library's philosophy is 'test components the way users interact with them.' It encourages querying by accessible text and roles rather than testing internal implementation details. This makes tests more robust to refactoring and more aligned with real user behavior.
Related Resources
Related Lessons
- React Testing
Testing React components.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.