
Learn how to get the best help in the Udemy Q&A by asking clear questions, sharing your code with a GitHub link, and reviewing featured questions to accelerate learning.
Explore how the logErrorToast saga watches the start toast action, detects error toasts, and sends those events to analytics before rendering the toast in the app.
Practice a code quiz by writing a test for a non error toast that does not trigger analytics, using an info toast payload and a negated assertion.
Explore advanced Redux Saga testing with test plan syntax, mocking, and action dispatching to drive ticket hold, ticket flow sagas, and flow charts; include Jest parameterization.
Learn to test a redux-saga race between purchase result and abort, forcing abort to win with a dynamic provider and a race matcher, and explore optional quizzes and testcase parameterization.
Explore handling the cancel path in a redux-saga flow for ticket holds, including server holds, navigate-away scenarios, cancel and abort actions, and notification toasts, with tests using jest test.each.
Create a per test redux store using the production store creator, wrap the UI in a redux provider with initial state, and export a custom render from test utils.
Write a custom render for testing React components with the testing library, wrapping them in a redux provider and test store with optional preloaded state and TypeScript types.
Learn to test a band page route with URL parameters by rendering the app, setting the route history, and mocking server data via service worker endpoints.
Test that clicking the tickets button on the shows page pushes the correct tickets route with the show id, illustrating unit tests for routing with URL parameters.
Write tests for bad query params, ensuring the app redirects to tickets and show id when hold id or seat count are missing, including auth protected routing and app rendering.
Finalize redirect for protected routes after sign in by testing the sign-in form with a data test id, using get by test id and get by role.
Test the sign-in flow from a failed sign-in to a successful sign-in using mock service worker and reset handlers, parameterizing server errors to ensure protected routes load correctly.
Execute a code quiz that tests handling a 500 server error during sign in, by deleting and rewriting tests from scratch, resetting handlers, and verifying redirection and history updates.
Parametrize test scenarios for sign in and sign up, including server errors, an incorrect password, and 400 responses like email already in use, using mock service worker and response resolvers.
Are you a developer who's learned the basics of React testing and wants to move to the next level? This course dives deep into React testing for sophisticated apps.
Test Redux Saga, React Router or Both
The Redux Saga and React Router sections of the course are completely separate. You can choose which technology to start with, and skip the sections for technologies that aren't relevant to your app.
Test an Existing App
The app for the course is already built, so you'll be testing an existing app that utilizes Redux Saga and React Router (with Auth-Protected Routes). For an added bit of fun, the app is for a music venue that sells tickets to shows for fake bands, complete with fake band names, plus randomized band descriptions and photos.
redux-saga-test-plan
Test Redux Sagas with the redux-saga-test-plan library, a powerful module that allows flexible integration testing and precise unit testing. The course covers the `provide()` method for static and dynamic effect mocking.
React Router
The course creates a custom `render` method for Testing Library to write tests that can assert either on page behavior or the React Router `history` object. Tested routes include URL and query params, and the flow for auth-protected routes (including removing the sign-in page from the history). Mock Service Worker provides mocked data for network calls to the server.
Jest's test.each()
In both the Redux Saga sections and the React Router sections, the course teaches Jest's test.each() method for parametrizing tests (that is running the same test multiple times with different data).
TypeScript
Following modern JavaScript best practices, all course code is typed via TypeScript.
Proven Instructor
The instructor for this course has been writing courses for Udemy since 2018, and has a great track record of courses that are clear and easy to follow. She loves interacting with students via Q&A and has a calm, supportive teaching style.