スキル一覧に戻る
djankies

reviewing-test-quality

by djankies

0🍴 0📅 2025年11月25日
GitHubで見るManusで実行

SKILL.md


name: reviewing-test-quality description: Review React 19 test quality including coverage, patterns, and React 19 API testing. Use when reviewing tests or test coverage. review: true allowed-tools: Read, Grep version: 1.0.0

Review: Test Quality

For Vitest configuration validation (pool options, coverage setup, deprecated patterns), see vitest-4/skills/reviewing-vitest-config/SKILL.md.

Checklist

Test Coverage

  • Components have tests for user interactions
  • Forms test both success and error paths
  • Server Actions tested in isolation
  • Custom hooks tested with renderHook
  • Edge cases covered (empty states, errors, loading)

React 19 APIs

  • Forms using useActionState have tests
  • useOptimistic updates tested for immediate feedback
  • useFormStatus tested within form component context
  • Server Actions tested with mocked auth/database
  • use() hook tested with Promises and Context

Testing Patterns

  • Using @testing-library/react and @testing-library/user-event
  • Queries prefer accessibility (getByRole, getByLabelText)
  • waitFor used for async assertions
  • Mocking external dependencies (API, database)
  • Tests are isolated and don't depend on each other

Anti-Patterns

  • ❌ Testing implementation details (internal state, methods)
  • ❌ Querying by class names or data-testid when role available
  • ❌ Not waiting for async updates (waitFor)
  • ❌ Testing components without user interactions
  • ❌ Missing error case tests

Server Action Testing

  • Server Actions tested as functions (not through UI)
  • Input validation tested
  • Authentication/authorization tested
  • Database operations mocked
  • Error handling tested

For typed test fixtures and mocks, use the TYPES-generics skill from the typescript plugin.

For comprehensive testing patterns, see: research/react-19-comprehensive.md.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です