Agent skill
jest
Jest configuration, mocking strategies, snapshot testing, and coverage.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/jest-a5c-ai-babysitter-2
SKILL.md
Jest Skill
Expert assistance for testing with Jest.
Capabilities
- Configure Jest for various frameworks
- Implement mocking strategies
- Write snapshot tests
- Configure coverage
- Handle async testing
Test Patterns
describe('UserService', () => {
let service: UserService;
let mockRepository: jest.Mocked<UserRepository>;
beforeEach(() => {
mockRepository = {
findAll: jest.fn(),
findById: jest.fn(),
create: jest.fn(),
};
service = new UserService(mockRepository);
});
it('should return all users', async () => {
mockRepository.findAll.mockResolvedValue([{ id: '1', name: 'John' }]);
const result = await service.findAll();
expect(result).toHaveLength(1);
expect(mockRepository.findAll).toHaveBeenCalled();
});
});
Target Processes
- unit-testing
- integration-testing
- tdd-development
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?