Mocking Axios in Jest + Testing Async Functions
Leigh Halliday
•
April 13, 2018
Leigh Halliday
View ChannelAbout
Hey folks! In this channel I'll be adding tutorials about JavaScript and React. For more information about me, please check out my website at https://www.leighhalliday.com and my Next.js Course at https://next.leighhalliday.com
Video Description
Article and source code here: https://www.leighhalliday.com/mocking-axios-in-jest-testing-async-functions In this video we'll look at a function that makes an HTTP request using the axios library to the Unsplash API and figure out how we can test it using a fake/mock version of axios to avoid performing real HTTP requests. We will be using Jest and some mocking functionality that it provides.
No Recommendations Found
No products were found for the selected channel.




















