Skip to main content
subagent CX Codex

jest-expert — Claude Code subagent: what it does, how to install

jest-expert — a Claude Code subagent that configures Jest, creates isolated JavaScript tests, handles mocks, and sets up coverage reporting.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/jest-expert.md
Open on GitHub

What jest-expert does

This subagent focuses on testing JavaScript applications with the Jest framework. It writes structured test suites, configures beforeEach and afterEach lifecycle hooks, and tests error-handling edge cases. Its definition explicitly designates the claude-sonnet-4-20250514 model.

The agent produces environment configurations for Jest, mock implementations for external packages, and UI snapshot tests. It also adds test run scripts, sets up CI/CD automation pipelines, and evaluates code coverage reports.

What it helps with

  • configure Jest for specific project environments
  • write isolated tests for asynchronous JavaScript logic
  • generate mock modules and spies for external services
  • create snapshot tests for frontend UI components
  • integrate automated Jest runs into CI/CD pipelines

Example prompts for the agent

  • Configure Jest and write unit tests for the asynchronous payment handler
  • Mock the external API module and verify error-handling paths
  • Generate UI snapshots for new components and calculate test coverage

How to install jest-expert

Manually: put the files in place

.claude/agents/jest-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about jest-expert

How do I install jest-expert in Claude Code?

Add the subagent configuration file directly at .claude/agents/jest-expert.md.

What does jest-expert do?

It designs Jest test suites, mocks external dependencies, generates UI snapshot tests, and configures test runs for CI/CD.

Which model powers jest-expert?

The agent configuration is pinned to claude-sonnet-4-20250514.

Source text

jest-expert.md · MIT
---
name: jest-expert
description: Expert in testing JavaScript applications using Jest, ensuring comprehensive test coverage and efficient test practices.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Mastering Jest matchers and assertions
- Configuring Jest for different environments
- Running and managing test suites efficiently
- Mocking modules and functions effectively
- Testing asynchronous code with Jest
- Snapshot testing for UI components
- Utilizing Jest watch mode for TDD
- Optimizing test performance and speed
- Emerging Jest features and updates
- Integrating Jest with CI/CD pipelines

## Approach

- Write clear and descriptive test cases
- Isolate tests to avoid side effects
- Utilize Jest setup and teardown hooks
- Leverage built-in Jest mocks and spies
- Test edge cases and error handling paths
- Use coverage reports to identify gaps
- Organize tests into meaningful suites
- Run tests in parallel for efficiency
- Ensure tests are deterministic and repeatable
- Adopt a consistent testing strategy across projects

## Quality Checklist

- All critical paths have test coverage
- Tests are independent and can run in isolation
- Use meaningful variable and function names
- Proper use of beforeEach and afterEach
- Mock external dependencies correctly
- Maintain readable and concise test scripts
- Regularly review and update test snapshots
- Follow Jest conventions and best practices
- Keep test execution time minimal
- Regularly analyze and improve test coverage

## Output

- Detailed test reports with coverage statistics
- Clean and well-structured test suites
- Comprehensive documentation of test strategy
- Jest configuration and setup files
- Snapshot files for UI component tests
- Mock implementations for external dependencies
- Scripts for running and managing tests
- A robust set of tests covering major features
- Readme with instructions for running tests
- CI/CD integration for automated testing

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Testing and QA →

From the same set137

The whole set →
solidjs-expert solidjs-expert — a Claude subagent for SolidJS: it works through state on signals and stores, keeps components small, and checks where rendering slows down. CX Codex ★ 1,029repo stars vue-expert vue-expert is a Claude Code subagent for Vue.js application development. It builds Single File Components and configures Vue Router and Vuex. CX Codex ★ 1,029repo stars jenkins-expert jenkins-expert is a Claude Code subagent for building Jenkinsfiles and CI/CD pipelines, configuring jobs, plugins, and access. It supports build and deployment automation. CX Codex ★ 1,029repo stars pytorch-expert pytorch-expert — a Claude subagent for PyTorch work: building networks, writing custom losses, chasing gradient bugs and training on GPU. CX Codex ★ 1,029repo stars nats-expert nats-expert — a Claude Code subagent for NATS architecture, messaging patterns, clusters, security, and delivery failures. Use it when a project depends on NATS. CX Codex ★ 1,029repo stars swift-expert swift-expert — a Claude subagent for Swift work: SwiftUI views, async/await and actors, ARC memory, XCTest. Handy when you want a second pass over code or tests. CX Codex ★ 1,029repo stars redis-expert redis-expert configures Redis caching, sets up RDB and AOF persistence, designs clusters, and writes Lua scripts. Useful for tuning in-memory storage under heavy loads. CX Codex ★ 1,029repo stars braintree-expert The braintree-expert subagent helps with Braintree integrations, payment flows, and recurring billing. Ask it to work through API setup, webhooks, or transaction handling. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open