本文へスキップ
Kitbay
スキル公式

react-testing

NOASSERTION2026年11月11日 更新45,751GitHubスター

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.

スキルの内容

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.

できること

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