DEV Community

Discussion on: The only 3 steps you need to mock an API call in Jest

Collapse
 
nuculabs_dev profile image
Nucu Labs • Edited

Great article!

I like to wrap Axios functions under my own functions so I can mock them instead.

Collapse
 
zaklaughton profile image
Zak Laughton

Agreed! I usually like to abstract away axios functionality in custom functions. I mocked axios directly in this article though just for the purposes of keeping the mocking example simple.