Login
Roast topics
Find topics
Find it!
From:
Leigh Halliday's RSS Feed
(Uncensored)
subscribe
Testing Asynchronous Components with Mocks in Jest
https://www.leighhalliday.com/testing-asynchronous-components-mocks-jest
links
backlinks
Tagged with:
testing
javascript
react
jest
mocks
Roast topics
Find topics
Roast it!
In this article below we will test a component which runs asynchronous code inside of its componentDidMount lifecycle event. We'll look at how to avoid making real AJAX requests through the mocking functionality provided by Jest, as well as learn a…