How to write a simple async test for fetch api call in React Testing Library
I have a React component as follows. The fetch api is called once the dom load is complete. I want to display the data as a list which is received from the api call.
I have a React component as follows. The fetch api is called once the dom load is complete. I want to display the data as a list which is received from the api call.