Login
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
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…
Roast topics
Find topics
Find it!