How to test API calls

Daniel Afonso
3 min readMay 21, 2021

Hey everyone, recently I’ve seen a couple of questions regarding testing in the JavaScript ecosystem. Some of the questions are:

  • How to test API calls?
  • How to test axios?
  • How to test API calls fired from a useEffect hook?
  • How to test API calls from React Query?

--

--

Daniel Afonso

Building content, code, and memes🦔💻 🥑Developer Advocate at OLX Group