Basically I am starting with Jest and I want to know with this tool if an API returns a response with status code 200. I have searched many ways to do it on the internet but none of them worked for me and I kept getting errors.
Could someone give me a hand on that?
For example, make a Rick & Morty API call with either Axios or Fetch and see if it returns a 200 status code:
CodePudding user response:
UPDATE: