Learn how to unit test the state of the component and spying on the instance method and accessing UI components inside the component.
We are going to mock the axios library to test the success and error condition of the api in our react class using the enzyme library.
Learn how the way we write unit test case differs from enzyme to react testing library.
Learn how to use simulate function from enzyme to test the various events and also test out the data to the event.
Learn the difference in testing async code between enzyme and react testing library.
Learn how to write unit test cases for Axios and Fetch library and mock the api calls to test in development mode.
Learn how to write unit test cases for timer functions like settimeout and setinterval in React using jest and enzyme library.
We will learn why React testing library is better testing library. It comes default in create react app and it is easy to test react component.
Difference between react-testing-library and enzyme on setup, concept, forceUpdate or shallow/deep rendering of the component