Files
airflow/dev/react-plugin-tools/react_plugin_template/ai-agent-rules/testing.md
T
Shae Alhusayni 723b06b38a Add optional AI agent rules to React plugin template (#69994)
* Add optional AI agent rules to React plugin template

* Address React plugin AI rule feedback
2026-07-21 10:58:52 -04:00

1.7 KiB

Table of Contents generated with DocToc

Testing and validation

  • Add a colocated .test.tsx file for new components and changed behavior.
  • Use Vitest and Testing Library to test behavior visible to users. Prefer accessible queries and user interactions over implementation details.
  • Cover relevant loading, error, empty, and success states as well as important interactions.
  • Do not test React, Chakra UI, React Router, or other third-party internals.
  • Keep tests deterministic and restore mocks between tests.
  • Before finishing a change, run pnpm lint, pnpm test, and pnpm build. Run pnpm format when source formatting changes.