docs: add guidance on testing suspense hooks with MockedProvider#13291
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'.
Annotations
Check notice on line 259 in docs/source/development-testing/testing.mdx
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
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.
```