ワンクリックで
react-testing
// Pragmatic React/Vitest testing workflow for DataConnect. Use when writing or updating React/UI code, deciding what tests to add, running tests for a change, or before commit.
// Pragmatic React/Vitest testing workflow for DataConnect. Use when writing or updating React/UI code, deciding what tests to add, running tests for a change, or before commit.
Debug and repair code using minimal, reviewable patches instead of full-file rewrites. Use this whenever the user is fixing a bug, iterating on failing tests, asks for a surgical code change, wants a minimal diff, or is in a tight debug loop where output size and token cost matter. Prefer this even if the user does not explicitly say "patch."
Build or use a tight automated test-fix loop that repairs one failing test at a time with minimal patches and narrow context. Use whenever the user wants a repair harness, constrained bug-fixing loop, failing-test repair workflow, or a prompt that turns the model into a surgical fix engine instead of a general coding assistant.
Interact with local Chrome browser session (only on explicit user approval after being asked to inspect, debug, or interact with a page open in Chrome)
Reduce cognitive load when implementing or refactoring code for readability.
Audit and refactor React UI components to match DataConnect UI implementation rules (Text component, tokens, Tailwind, naming) and Vercel React/composition guidance. Use when the user asks for a UI audit, React audit, composition review, or to fix UI implementation issues in components.
Standardize DataConnect route/page layout, logic/JSX separation, tests, and README expectations. Use when organizing pages/routes, refactoring page structure, or discussing file structure conventions.
| name | react-testing |
| description | Pragmatic React/Vitest testing workflow for DataConnect. Use when writing or updating React/UI code, deciding what tests to add, running tests for a change, or before commit. |
Validate new behavior without overengineering; run the smallest test set that proves the change works.
npx vitest run src/pages/runs/index.test.tsxnpx vitest run src/pages/runsnpx vitest run -t "hides tabs when browser is not ready"getByRole/getByText; use *AllBy* only when multiples are expected.console.error and assert calls to keep test output clean while preserving coverage.If a change introduces URL-backed UI state (for example useSearchParams, location.search, or URLSearchParams), require at least one non-mocked behavior test that covers:
Do not treat a page test that mocks the page hook as sufficient coverage for URL state logic.