Testing async setState in React: setTimeout in componentDidMount

Testing of native timer functions used in a React component with Jest and Enzyme

Davide Ramaglietta
2 min readJul 2, 2018

--

The React component

We have a React component which renders a list of item. Every item of the list is rendered with a delay of 500ms.

--

--