AI, Data Science & Cloud Certificates from Google, IBM & Meta
Learn Backend Development Part-Time, Online
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial shows how to use MSW to mock a REST API server and write asynchronous unit and integration tests for CRUD behavior in a Next.js app with Jest and React Testing Library.
Syllabus
Intro
Welcome
Prerequisites & Starter Code
Lesson Goal
Adding Dependencies
Mock REST API Server Setup
Async Unit Testing
Modify the Server Response for a test
Completing the Mock Endpoint handlers
Completing the CRUD Unit Tests
Adding the Async CRUD functions to the app
Adding New & Updating Integration Tests
Unit Test Update
Wrap-up
Taught by
Dave Gray