Skip to content
Kitbay

react-testing

NOASSERTIONUpdated on Nov 11, 202645,751GitHub stars

A maintainer skill in Sentry's repository for writing and reviewing React and TypeScript tests for Sentry's frontend with Jest and React Testing Library.

What the skill teaches

A maintainer skill in Sentry's repository for writing and reviewing React and TypeScript tests for Sentry's frontend with Jest and React Testing Library. Tests should follow user workflows, assert specific outcomes such as request payloads and error messages, cover failure paths and stay independent, while appearance belongs in the repository's visual snapshot files rather than DOM tests. Rules cover importing from Sentry's own test wrapper, preferring role queries, using fixture factories instead of hand-written objects, not mocking hooks or contexts, choosing getBy, queryBy or findBy correctly, using userEvent rather than fireEvent, setting routes through the render options, and mocking API responses with MockApiClient.

Capabilities

  • Write React Testing Library tests
  • Mock API responses with MockApiClient
  • Choose the right query and async helpers
  • Keep appearance checks in snapshots