Handling async behaviour in React component testing with Jest

Chanon Roy
4 min readNov 1, 2020

I can guess why you’re here. You started testing your React components with Jest. Awesome! 😎 But then you started adding async behaviour to your components and now you started seeing these vague “fail” messages:

--

--

Chanon Roy

🧑🏻‍💻 I write about tech and programming. I'm also fluent in film references