Pular para o conteúdo
Kitbay
SkillOficial

react-testing

NOASSERTIONAtualizado em 11 de nov. de 202645.751Estrelas no GitHub

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.

O que a skill ensina

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.

O que faz

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