Mocking a REST API Server for Testing with Jest and React Testing Library
Offered By: Dave Gray via YouTube
Course Description
Overview
Learn how to mock a REST API server for testing with Jest and React Testing Library in this comprehensive tutorial video. Discover the process of setting up a mock REST API server using MSW and writing asynchronous unit and integration tests for a Next.js application. Follow along as the instructor guides you through adding dependencies, configuring the mock server, writing async unit tests, modifying server responses, completing CRUD operations, and updating integration tests. Gain valuable insights into best practices for testing React applications and improve your skills in creating robust, testable code.
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
Related Courses
Ruby on Rails: An IntroductionJohns Hopkins University via Coursera Internet of Things Capstone: Build a Mobile Surveillance System
University of California, San Diego via Coursera Engineering Maintainable Android Apps
Vanderbilt University via Coursera Orientação a Objetos com Java
Instituto Tecnológico de Aeronáutica via Coursera TDD – Desenvolvimento de Software Guiado por Testes
Instituto Tecnológico de Aeronáutica via Coursera