Guides writing or changing Vitest and React Testing Library frontend tests by following each package's own testing policy.
- What it does
- This skill directs an agent to read the testing policy document owned by the package whose tests are being changed, either web/docs/test.md for web/ or packages/dify-ui/docs/testing.md for packages/dify-ui/. It adds no separate policy or check sequence, instead deferring to the owner document's test boundaries, environments, and validation commands. It also encourages removing low-value tests as readily as adding coverage, and asks for a report of the contract verified and any material verification gap.
- When to use it
- Use it when writing or modifying Vitest or React Testing Library tests under web/ or packages/dify-ui/, or when the user explicitly asks for frontend test strategy, including evaluating an existing strategy. It is not intended for frontend code-review-only requests, general testability discussion, Python tests, or Cucumber/Playwright end-to-end tests.
- Requirements
- No scripts are included; it is instructions only. It depends on the referenced policy documents existing in the repository: web/docs/test.md and packages/dify-ui/docs/testing.md.