Welcome to testing React components with React Testing Library! In this course, you will learn lots of things. You will learn:The principles of Test Driven DevelopmentKnow what is React Testing Library (RTL) and its differences with Enzyme (another popular test framework for React)Understand how Create React App (CRA) works.Understand how Jest works with RTLHow to test with RTL and query elements with:getBy, queryBy, findBy, getAllBy, queryAllBy, findAllByHow to simulate user interaction with the fireEvent APIHow to simulate user interaction with the userEvent APITesting components in isolation (unit tests)Learn about coverage and debuggingHow to mock 3rd party libraries like Axios and mock a GET requestLearn about the pitfalls of CRAYou will have all the fundamental tools to test any React component and have that coverage at 100%!Have fun, and never stop learning!
What you'll learn
Understand the principles of Test Driven Development
Differentiate between React Testing Library and Enzyme
Gain proficiency in querying elements with various RTL methods
Simulate user interactions using fireEvent and userEvent
Test components in isolation and learn to mock third-party libraries