什麼是 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