react-testing
信頼性の高いReactテストを構築する
Reactのテストスイートは、非同期状態、providers、mocksの扱いに一貫性がないと、不安定になりがちです。このスキルは、Claude、Codex、Claude Codeに、焦点を絞ったReactテストの実践的なパターンを提供します。
自分のエージェントでインストール
このリクエストをエージェントにコピーしてください。正規の Skill ページとマニフェストが含まれています。
Review the Skillstore skill "react-testing" from https://skillstore.io/skills/cjharmath-react-testing.md and its manifest at https://skillstore.io/api/skills/cjharmath-react-testing/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.エージェントは引き続き計画を提示し、セキュリティポリシーで必要な確認を求める必要があります。
エージェントが読めるリソース
AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。
テストする
「react-testing」を使用しています。 ログインフォームには、必須項目、送信成功、loading behaviorのテストが必要です。
期待される結果:
- validation、submission、disabled button statesに焦点を当てたテスト計画。
- email、password、submit controlsに対する推奨accessible queries。
- submit handlerとloading propのmocking guidance。
「react-testing」を使用しています。 Zustand store testでテストケース間にstateが漏れています。
期待される結果:
- 各テスト前にinitial store stateを復元するreset strategy。
- async actions完了後にfresh stateを読み取るためのアドバイス。
- component re-rendersに依存せずにstate changesを確認するassertions。
「react-testing」を使用しています。 React Queryを使うcomponentが、providerがないため失敗します。
期待される結果:
- 分離されたtest query clientを使う再利用可能なprovider wrapper。
- deterministic testsに適したretryとcache settings。
- loading statesとresolved statesのためのwaiting strategy。
セキュリティ監査
安全All static external command findings are false positives caused by Markdown code fences or inline backticks in documentation examples. The sensitive-data and reconnaissance findings are also false positives from normal test assertions. No evidence of prompt injection, data exfiltration, or malicious intent was found.
リスク要因
⚙️ 外部コマンド (27)
このレポートを共有・引用
バージョン付き評価レポート、中立的なバッジ、埋め込みカード、引用を共有できます。Skillstore は証拠を報告しますが、この Skill が安全かどうかは判断しません。
レポートリンクをコピー
https://skillstore.io/skills/cjharmath-react-testing/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdownバッジ
[](https://skillstore.io/skills/cjharmath-react-testing?utm_source=security_passport_badge)HTMLバッジ
<a href="https://skillstore.io/skills/cjharmath-react-testing?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/cjharmath-react-testing/security.svg" alt="Skillstore security assessment" loading="lazy"></a>埋め込みカード
<iframe src="https://skillstore.io/embed/skills/cjharmath-react-testing.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学術引用 (APA · BibTeX · CFF)
APA形式の引用
CJHarmath. (2026). react-testing security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/cjharmath-react-testing/audits/7BibTeX形式の引用
@techreport{cjharmath-cjharmath-react-testing-2026,
author = {CJHarmath},
title = {react-testing security audit report (audit version 7)},
institution = {Skillstore},
year = {2026},
number = {7},
url = {https://skillstore.io/skills/cjharmath-react-testing/audits/7},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "react-testing security audit report (audit version 7)"
version: "unspecified"
type: report
authors:
- name: "CJHarmath"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/cjharmath-react-testing/audits/7"
identifiers:
- type: other
value: "skillstore:cjharmath-react-testing:audit:7"
description: "Skillstore immutable audit report identifier"
Skillstore スコア
このスコアの理由 証拠の信頼度: 高作成できるもの
component test coverageを追加する
rendering、loading states、user actions、accessible outputを検証するテストを作成します。
stateful test suitesを安定化する
Zustand storesとReact Query clientsをリセットし、テストを分離された再現可能な状態に保ちます。
async UI failuresをデバッグする
React testsにおけるact warnings、timing issues、missing queries、mock mismatchesを解決します。
これらのプロンプトを試す
このcomponentのReact Testing Library testsを書いてください。rendering、user actions、loading state、accessible queriesをカバーしてください。
このasync React state flowのtestsを作成してください。actまたはwaitForの使用、store reset、各async step後の明確なassertionsを含めてください。
React Query、routing、context providers、mocked API modulesを含むこのcomponentのtestsを設計してください。provider setupは再利用可能に保ってください。
この失敗しているReact test outputとtest fileをレビューしてください。考えられる原因を特定し、修正方法を説明し、より強いassertionsを提案してください。
ベストプラクティス
- ユーザーがページを操作する方法に合ったaccessible queriesを優先します。
- 各テスト前にstores、mocks、query clientsをリセットします。
- 最終状態をassertする前に、async UI changesを待ちます。
回避
- テストケース間でmutable store stateを共有しないでください。
- 動的または頻繁に変化するcontentにsnapshotsを使用しないでください。
- async state updatesを確認せずにact warningsを無視しないでください。