vitest-best-practices
✓在編寫、審查或重構 vitest 測試時使用。當您看到 *.test.ts 或 *.spec.ts 文件、嵌套描述塊、鬆散斷言 (toBeTruthy)、過度模擬、緩慢測試或異步測試需求時加載。涵蓋 AAA 模式、參數化測試、測試雙打層次結構、模擬清理、測試隔離和性能優化。關鍵字包括 vitest、測試、TDD、斷言、mock、stubs、fakes、spies、beforeEach、describe、it、expect、vi.mock、it.each。
SKILL.md
Comprehensive patterns for writing maintainable, effective vitest tests. Focused on expert-level guidance for test organization, clarity, and performance.
This skill uses a progressive disclosure structure to minimize context usage:
Start with the Overview (AGENTS.md) Read AGENTS.md for a concise overview of all rules with one-line summaries and the workflow for discovering existing test configuration.
在編寫、審查或重構 vitest 測試時使用。當您看到 *.test.ts 或 *.spec.ts 文件、嵌套描述塊、鬆散斷言 (toBeTruthy)、過度模擬、緩慢測試或異步測試需求時加載。涵蓋 AAA 模式、參數化測試、測試雙打層次結構、模擬清理、測試隔離和性能優化。關鍵字包括 vitest、測試、TDD、斷言、mock、stubs、fakes、spies、beforeEach、describe、it、expect、vi.mock、it.each。 來源:gohypergiant/agent-skills。
可引用資訊
為搜尋與 AI 引用準備的穩定欄位與指令。
- 安裝指令
npx skills add https://github.com/gohypergiant/agent-skills --skill vitest-best-practices- 分類
- </>開發工具
- 認證
- ✓
- 收錄時間
- 2026-02-01
- 更新時間
- 2026-02-18
快速解答
什麼是 vitest-best-practices?
在編寫、審查或重構 vitest 測試時使用。當您看到 *.test.ts 或 *.spec.ts 文件、嵌套描述塊、鬆散斷言 (toBeTruthy)、過度模擬、緩慢測試或異步測試需求時加載。涵蓋 AAA 模式、參數化測試、測試雙打層次結構、模擬清理、測試隔離和性能優化。關鍵字包括 vitest、測試、TDD、斷言、mock、stubs、fakes、spies、beforeEach、describe、it、expect、vi.mock、it.each。 來源:gohypergiant/agent-skills。
如何安裝 vitest-best-practices?
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/gohypergiant/agent-skills --skill vitest-best-practices 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用
這個 Skill 的原始碼在哪?
https://github.com/gohypergiant/agent-skills
詳情
- 分類
- </>開發工具
- 來源
- skills.sh
- 收錄時間
- 2026-02-01