Agent skill

jest

Jest testing patterns and best practices. Unit, integration, and snapshot testing for JavaScript/TypeScript. Trigger: When writing or running tests with Jest.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/jest-joabgonzalez-ai-agents-framework

SKILL.md

Jest Skill

When to Use

  • Unit, integration, or snapshot testing
  • Testing JS/TS codebases
  • Mocking dependencies

Critical Patterns

  • Use describe/it for structure
  • Use beforeEach/afterEach for setup/teardown
  • Prefer jest.mock for isolation

Decision Tree

  • Unit or integration? → Structure tests accordingly
  • Need mocks? → Use jest.mock
  • Async code? → Use async/await in tests

Edge Cases

  • Mocking ES modules
  • Flaky async tests
  • Snapshot drift

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results