info@lebersoftware.hu

How to use Enzyme and Jest to write unit tests for a React app (mock out useAsync, action)

Welcome to Codeching channel! In this tutorial I will show you how to use Enzyme and JEST to write unit tests for a React application. We will install Enzyme, configure it and write test cases to test our component in the React application. We will mock out the useAsync hook from the react-async package and we will mock out an action too.

You can find the starter project source code here: Download source

The final code can be downloaded from here: Download source

You can watch the video here: https://www.youtube.com/watch?v=bAWiu7a-mHc

About the channel: Codeching. This channel contains videos which teach practical techniques for using the JavaScript better and how the language works and why. It contains coding theory, programming stacks, modern web frameworks, interview questions and many more.

Leave a Reply