Skip to content

docs: add guidance on testing suspense hooks with MockedProvider#13291

Merged
jerelmiller merged 5 commits into
mainfrom
copilot/fix-mockedprovider-suspense-query
Jun 30, 2026
Merged

docs: add guidance on testing suspense hooks with MockedProvider#13291
jerelmiller merged 5 commits into
mainfrom
copilot/fix-mockedprovider-suspense-query

Merge branch 'main' into copilot/fix-mockedprovider-suspense-query

b318a37
Select commit
Loading
Failed to load commit list.
Apollo Librarian / AI Style Review succeeded Jun 30, 2026 in 25s

Style Review Completed

The pull request has 2 style issues.

Duration: 3749ms
PR URL: #13291
Review Log: View detailed log
Review Comments: The AI has posted 2 inline comments with suggestions

Summary of changes:

The documentation has been updated to align with the style guide across three key sections. Under structural elements, headings were updated to sentence case, specifically treating 'suspense' as a common noun. For framing Apollo products, the narrative was shifted to emphasize the benefits of the suspense approach over the limitations of previous methods. Finally, language was improved for global accessibility by replacing the idiom 'in flight' with clearer terms like 'active' or 'processing'.

⚠️ This review and suggested changes are AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

Annotations

Check notice on line 259 in docs/source/development-testing/testing.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/development-testing/testing.mdx#L259

**Structural Elements**: Headings should use sentence case. 'Suspense' is a React feature but generally treated as a common noun in this context unless referring to the specific component <Suspense />.

```suggestion
## Testing with suspense
```

Check notice on line 263 in docs/source/development-testing/testing.mdx

See this annotation in the file changed.

@apollo-librarian apollo-librarian / AI Style Review

docs/source/development-testing/testing.mdx#L263

**Framing Apollo Products**: Focus on the advantages of the suspense approach rather than the limitations of useQuery.

**Language**: The idiom 'in flight' may be difficult for non-native speakers to understand. Use 'active' or 'processing' instead.

```suggestion
`useSuspenseQuery` suspends the component immediately, allowing you to manage loading states at the boundary level. Without `await act()`, the component stays suspended in your test environment and the test times out.
```