# Testing API Calls With React Testing Library and Jest

DevFeed: [Testing API Calls With React Testing Library and Jest](<https://devfeed.tech/articles/testing-api-calls-with-react-testing-library-and-jest-37594.md>)

Original publisher: [Read original article](<https://www.taniarascia.com/how-to-test-useeffect-api-call/>)

Author: hello@taniarascia.com

Published: 2022-12-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tania Rascia](<https://devfeed.tech/sources/tania-rascia.md>)

Topics: [testing-library](<https://devfeed.tech/topics/testing-library.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [React](<https://devfeed.tech/topics/react.md>), [API](<https://devfeed.tech/topics/api.md>), [Jest](<https://devfeed.tech/topics/jest.md>), [Webpack](<https://devfeed.tech/topics/webpack.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [jest](<https://devfeed.tech/tags/jest.md>), [react](<https://devfeed.tech/tags/react.md>), [testing](<https://devfeed.tech/tags/testing.md>), [testing-library](<https://devfeed.tech/tags/testing-library.md>), [webpack](<https://devfeed.tech/tags/webpack.md>)

## AI overview

A tutorial showing how to test React useEffect API calls with Jest and React Testing Library, including tests for successful and failed requests.

## Source excerpt

Ever since Hooks were released in React, we've been using the hook to fetch data, whether directly or abstracted away behind Redux Thunks...