We will look into the overview of apis of react testing library - render, cleanup, act
In this tutorial, we will go through the get, query and find apis of the render method of the react testing 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.
We will learn how to test the component using the MemoryRouter, passing custom pathname to the MemoryRouter and wrapping the component with Router to access change in pathname.
We are going to mock the axios library by using the jest.mock function and providing a sample mock factory implementation.
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.
We are going to mock the axios library without using any mock adapter. We will test the resolved value (success) and the rejected value(error) conditions of the axios call.
Learn how to use lighthouse in continuous integration system. We will see an example with travis ci.