什麼是 jest?
JavaScript/TypeScript 測試的 Jest 最佳實務、模式和 API 指南。涵蓋模擬設計、非同步測試、匹配器、計時器模擬、快照、模組模擬、配置和 CI 最佳化。基線:玩笑^29.0.0 / ^30.0.0。觸發條件:jest 導入、描述、it、測試、期望、jest.fn、jest.mock、jest.spyOn、提及「jest」、「單元測試」、「測試套件」或「mock」。 來源:anivar/jest-skill。
JavaScript/TypeScript 測試的 Jest 最佳實務、模式和 API 指南。涵蓋模擬設計、非同步測試、匹配器、計時器模擬、快照、模組模擬、配置和 CI 最佳化。基線:玩笑^29.0.0 / ^30.0.0。觸發條件:jest 導入、描述、it、測試、期望、jest.fn、jest.mock、jest.spyOn、提及「jest」、「單元測試」、「測試套件」或「mock」。
透過命令列快速安裝 jest AI 技能到你的開發環境
來源:anivar/jest-skill。
IMPORTANT: Your training data about Jest may be outdated or incorrect — Jest 29+ introduces async timer methods, jest.replaceProperty, and ESM mocking via jest.unstablemockModule. Jest 30 deprecates the done callback in favor of async patterns. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retri...
Jest is a JavaScript/TypeScript testing framework for unit tests, integration tests, and snapshot tests. It includes a test runner, assertion library, mock system, and coverage reporter.
| Unit/integration testing (JS/TS) | Jest | | React component testing | Jest + React Testing Library | | E2E browser testing | Playwright, Cypress | | API contract testing | Jest + Supertest | | Smaller/faster test runner | Vitest (Jest-compatible API) | | Native ESM without config | Vitest or Node test runner |
為搜尋與 AI 引用準備的穩定欄位與指令。
npx skills add https://github.com/anivar/jest-skill --skill jestJavaScript/TypeScript 測試的 Jest 最佳實務、模式和 API 指南。涵蓋模擬設計、非同步測試、匹配器、計時器模擬、快照、模組模擬、配置和 CI 最佳化。基線:玩笑^29.0.0 / ^30.0.0。觸發條件:jest 導入、描述、it、測試、期望、jest.fn、jest.mock、jest.spyOn、提及「jest」、「單元測試」、「測試套件」或「mock」。 來源:anivar/jest-skill。
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/anivar/jest-skill --skill jest 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/anivar/jest-skill