什么是 vitest?
使用 React 测试库进行 Vitest 单元测试模式。触发器:为 React 组件、挂钩或实用程序编写单元测试时。 来源:prowler-cloud/prowler。
使用 React 测试库进行 Vitest 单元测试模式。触发器:为 React 组件、挂钩或实用程序编写单元测试时。
通过命令行快速安装 vitest AI 技能到你的开发环境
来源:prowler-cloud/prowler。
For E2E tests: Use prowler-test-ui skill (Playwright). This skill covers unit/integration tests with Vitest + React Testing Library.
| 1 | getByRole | Buttons, inputs, headings | | 2 | getByLabelText | Form fields | | 3 | getByPlaceholderText | Inputs without label | | 4 | getByText | Static text | | 5 | getByTestId | Last resort only |
| vi.spyOn | Observe without replacing (PREFERRED) | | vi.mock | Replace entire module (use sparingly) |
使用 React 测试库进行 Vitest 单元测试模式。触发器:为 React 组件、挂钩或实用程序编写单元测试时。 来源:prowler-cloud/prowler。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/prowler-cloud/prowler --skill vitest使用 React 测试库进行 Vitest 单元测试模式。触发器:为 React 组件、挂钩或实用程序编写单元测试时。 来源:prowler-cloud/prowler。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/prowler-cloud/prowler --skill vitest 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/prowler-cloud/prowler