illustration for Confidently Testing Redux Applications with Jest & TypeScript
free

Confidently Testing Redux Applications with Jest & TypeScript

Instructor

Jamund Ferguson

1h 18m closed-captioning
·
32 lessons
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.8
62
people completed
Published 3 years ago
|
Updated 3 years ago

Best practices for building & testing redux applications have changed dramatically over time. This course aims to be a comprehensive and up-to-date resource for those seeking to confidently test their redux apps. Whether you're just getting started or want to improve on your existing testing strategy, there will be something in this course for you.

This first few lessons of this course look at how to add jest to an existing react/redux application that was built on top of vite. We cover basic functionality like using npm test vs npx jest and generating and using code coverage to inform our testing strategy.

The next 10 or so lessons cover the specifics of unit testing the redux code in our application. We'll go over how to test reducers, selectors and thunks. As part of this we'll touch on mocking APIs and using Redux Mock Store as well as running actions through our applications' actual reducers to broaden our test coverage.

In the final part of this course we'll look at how we can test our redux connected react components using the various utilities that come with the React Testing Library. We'll cover simulating various kinds of user input with the User Event Module, populating our redux store with test data, using jest spies, how to wait for asynchronous tasks to complete, and several approaches for finding & asserting that visual elements exist on the page.

This course is built on top of content that was created for the Modern Redux with RTK and TypeScript course and I highly recommend you start there if you haven't completed it already. It does expect a basic familiarity with react, redux and jest. TypeScript is used in these lessons, but is not a major focus and hopefully won't distract you too much if you prefer plain JavaScript.

No matter your experience level with redux and testing react applications, I'm confident your abilities will level up as you watch this course and follow along with the examples.

Thank you!

Free Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

What you'll learn:

  • Configure an app for testing with Jest
  • Reduce blindspots in an application with testing
  • Test application code functionality with unit tests
  • Test Redux thunks with redux-mock-store
  • Test use cases in an application with integration testing

Course Content

1h 18m • 32 lessons

    You might also like these resources:

    illustration for Modern Redux with Redux Toolkit (RTK) and TypeScript
    Jamund Ferguson • Course • 40m

    Learn how Redux Toolkit simplifies the process of setting up and maintaining your redux application when building slices, reducers, selectors, and thunks.

    illustration for Apply Redux to a Modern React Hooks Application
    Jamund Ferguson • Course • 42m

    You will learn how to apply Redux to a modern React Hooks application. Enabling you to effectively implement Redux and test your application at a high level.

    illustration for Modernizing a Legacy Redux Application with React Hooks
    Jamund Ferguson • Course • 25m

    Learn how to modernize your application through React Hooks and Redux