# Testing Apollo's Query Component

DevFeed: [Testing Apollo's Query Component](<https://devfeed.tech/articles/testing-apollo-s-query-component-23530.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/testing-apollos-query-component-d575dc642e04>)

Author: Jake Dawkins

Published: 2018-06-14T22:48:16Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [React](<https://devfeed.tech/topics/react.md>), [Jest](<https://devfeed.tech/topics/jest.md>), [Mocking](<https://devfeed.tech/topics/mocking.md>)

Tags: [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [jest](<https://devfeed.tech/tags/jest.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [react](<https://devfeed.tech/tags/react.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

A practical guide to testing React components that use Apollo Client. It explains why direct backend requests make tests unpredictable and introduces testing utilities, including MockedProvider, to provide controlled test conditions.

## Source excerpt

We've been working on a new guides and best practices site for Apollo and GraphQL that covers some of the most important topics we've heard from our users. This post reproduces part of the Testing React Components article, and if you'd like to read more about testing (including mutation components), and other best practices, check out the full article on the site! As always, we're grateful to the community help that makes Apollo possible.