Login
Roast topics
Find topics
Find it!
From:
Leigh Halliday's RSS Feed
(Uncensored)
subscribe
Mocking Axios in Jest + Testing Async Functions
https://www.leighhalliday.com/mocking-axios-in-jest-testing-async-functions
links
backlinks
Tagged with:
testing
javascript
react
jest
mocks
axios
Roast topics
Find topics
Roast it!
In our tests we don't want to perform an actual HTTP request. To start with it is slow, but there are certain calls you really can't make with every test run, for example charging someone's credit card. In this article we'll look at a function that…