Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Course Overview: Testing React Components with Enzyme and Jest


    This course is designed to give you the power to not only create composable elements but to create predictable React components. We will review most of the concepts required to make intuitive tests based on how our users will interact with the components.

    The course begins with basic concepts of setup and installing configurations to work with any release of React. Throughout the course we break down selectors, rendering methods, snapshot testing, and how to replicate user activity. We finish the course with more advanced lessons, the 'putting it all together' tutorials. We test a basic React form and a Redux connected component.



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    Instructor: When it comes to React, component reusability is king. We want our components to be composable and easy to use for our consumers.

    This course is designed to teach you all the core concepts of making predictable React components. Throughout this course, we use Enzyme in companion of Jest to test our components, not only how we want them to work but how our users would interact with them.

    I will show you the ropes of how to use Enzyme, from the initial setup to working with Redux-connected components. You'll learn how to configure Enzyme for whichever version of React you're using.

    Within this course, we will talk about the accepted selectors, rendering methods, how to work with React lifecycles, component state, and component props.

    We'll also use the power of Jest's Snapshots to guarantee the layout of component elements. Not to mention, replicating user interaction and testing class methods are two final lessons, combined elements throughout the course, and act as a putting it altogether.

    We'll test the basic React form that sends an ajax request on submit and test a Redux-connected component. All in an effort to give you the power to create predictable React components.