AgentSkillsCN

openwebf-app-testing-vitest

使用Vitest和React Testing Library设置和改进WebF应用测试。当用户提到Vitest、React Testing Library、单元测试、组件测试、“测试奖杯”或要求在Vite/React/TS WebF应用中添加/修复测试时使用。

SKILL.md
--- frontmatter
name: openwebf-app-testing-vitest
description: Set up and improve WebF app tests with Vitest and React Testing Library. Use when the user mentions Vitest, React Testing Library, unit tests, component tests, “testing trophy”, or asks to add/fix tests in a Vite/React/TS WebF app.
allowed-tools: Read, Grep, Glob, Bash, Edit, Write, mcp__openwebf__project_detect, mcp__openwebf__docs_search, mcp__openwebf__docs_get_section, mcp__openwebf__templates_get, mcp__openwebf__templates_render

OpenWebF App: Testing (Vitest + React Testing Library)

Instructions

  1. Identify the stack (React/Vue/etc.) and current test tooling (if any).
  2. Use MCP docs for the recommended testing approach and best practices.
  3. Prefer “testing trophy” prioritization:
    • unit tests for business logic
    • component tests for UI behavior
    • minimal integration/E2E only where needed
  4. Offer templates when appropriate:
    • app/vitest-config
    • app/react-testing-library-example

More: