Loading

If you have a component that makes HTTP requests, you’ll probably want to mock those out for UI unit and integration tests. Let’s see how to use jest’s built-in mocking capabilities to do that.

Transcript

Mock HTTP Requests with jest.mock in React Component Tests