$npx skillfedfor your agent

jest

This skill streamlines Jest configuration for TypeScript projects, handling setup automation and intelligent toolchain detection. It integrates with Claude's multi-agent ecosystem to accelerate test infrastructure deployment across diverse development stacks.

Jest streamlines TypeScript configuration through ts-jest, a TypeScript preprocessor that compiles your .ts and .tsx files on the fly. To set up Jest with TypeScript, install jest, ts-jest, and @types/jest, then create a jest.config.js file specifying ts-jest as your preset. Jest automatically detects your TypeScript files and applies the correct transformation rules, eliminating manual babel configuration. The skill handles intelligent toolchain detection to match your project structure, whether you're starting fresh or integrating into an existing codebase.

AI-generated summary based on this skill's SKILL.md

62 18 MITupdated by bobmatnyc

Decision gist · record as of 2026-07-18

Jest streamlines TypeScript configuration through ts-jest, a TypeScript preprocessor that compiles your .ts and .tsx files on the fly. To set up Jest with TypeScript, install jest, ts-jest, and @types/jest, then create a jest.config.js file specifying ts-jest as your preset. Jest automatically detects your TypeScript files and applies the correct transformation rules, eliminating manual babel configuration. The skill handles intelligent toolchain detection to match your project structure, whether you're starting fresh or integrating into an existing codebase.

manual: git clone https://github.com/bobmatnyc/claude-mpm-skills → cp -r claude-mpm-skills/toolchains/typescript/testing/jest ~/.claude/skills/jest
toolchains/typescript/testing/jest/SKILL.md · version 2e55aa9d

Use it when

  • Jest snapshot testing captures the rendered output or serialized state of a component or function and stores it as a reference file.
  • Jest supports type-safe mocking through TypeScript's type system and Jest's built-in mock utilities.

Verify before relying

Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

bobmatnyc/claude-mpm-skills/jest · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do you set up Jest with TypeScript?

Jest streamlines TypeScript configuration through ts-jest, a TypeScript preprocessor that compiles your .ts and .tsx files on the fly. To set up Jest with TypeScript, install jest, ts-jest, and @types/jest, then create a jest.config.js file specifying ts-jest as your preset. Jest automatically detects your TypeScript files and applies the correct transformation rules, eliminating manual babel configuration. The skill handles intelligent toolchain detection to match your project structure, whether you're starting fresh or integrating into an existing codebase.

What is Jest snapshot testing and when should you use it?

Jest snapshot testing captures the rendered output or serialized state of a component or function and stores it as a reference file. On subsequent test runs, Jest compares the current output against the stored snapshot to detect unintended changes. Snapshot testing is particularly valuable for React component testing, where you want to verify that UI structure remains consistent across refactors. Jest makes snapshot management straightforward—when intentional changes occur, you can update snapshots with a single command, and Jest tracks all snapshot files in version control for team collaboration.

How do you write type-safe unit tests and mock functions for TypeScript code?

Jest supports type-safe mocking through TypeScript's type system and Jest's built-in mock utilities. Use jest.fn() to create mock functions with full type inference, jest.spyOn() to spy on object methods, and jest.mock() to replace entire modules. TypeScript ensures that mock implementations match the original function signatures, catching type errors at compile time. Jest's mock functions support advanced patterns like return values, side effects, and call tracking. The skill enables developers to write comprehensive unit tests that verify both behavior and type correctness, reducing runtime errors and improving code reliability across your test suite.

Can Jest test React components and hooks using React Testing Library?

Jest integrates seamlessly with React Testing Library to test React components and hooks in a user-centric way. Jest provides the test runner and assertion framework, while React Testing Library supplies utilities like render(), screen, and fireEvent for interacting with components. For hook testing, Jest works with React Testing Library's renderHook utility to isolate and test custom hooks. Jest's snapshot testing pairs well with React component testing to catch unintended UI changes, and Jest's timer mocking (fake timers) handles async component behavior. This combination enables comprehensive React component testing across functional components, hooks, and complex user interactions.

How does Jest handle async testing patterns and promises?

Jest provides multiple patterns for testing asynchronous code: return promises directly from test functions, use async/await syntax for cleaner test code, or employ Jest's done callback for callback-based async operations. Jest automatically detects promise rejections and async errors, failing tests appropriately when promises reject. For timer-based async code, Jest's fake timers (jest.useFakeTimers()) let you control time progression and test delayed behavior without waiting for real delays. Jest also supports testing async functions that fetch data, make API calls, or perform other time-dependent operations, making it suitable for comprehensive async testing across Node.js and browser environments.

What Jest features support coverage reporting and configuration?

Jest's built-in coverage reporting generates detailed metrics for line coverage, branch coverage, function coverage, and statement coverage. Run Jest with the --coverage flag to produce coverage reports in multiple formats (text, lcov, html, json). Jest's jest.config.js supports coverage threshold configuration, allowing you to set minimum coverage percentages that fail the test suite if not met—ensuring code quality standards across your project. Jest displays coverage reports directly in the terminal and generates HTML reports for detailed analysis. The skill leverages Jest's comprehensive coverage features to help teams maintain testing standards and identify untested code paths in their TypeScript and JavaScript projects.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Jest + TypeScript - Industry Standard Testing

Overview

Jest is the industry-standard testing framework with 70% market share, providing a mature, battle-tested ecosystem for TypeScript projects. It offers comprehensive testing capabilities with built-in snapshot testing,

(truncated - see the full file via the links below)

File tree — 2 files
toolchains/typescript/testing/jest/SKILL.md
toolchains/typescript/testing/jest/metadata.json

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Set up and configure Jest with TypeScript for a new or existing project”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

vitest
by bobmatnyc · bobmatnyc/claude-mpm-skills

Vitest is a next-generation test framework powered by Vite, delivering rapid test execution through HMR and native ESM support. It offers built-in TypeScript integration, Jest-compatible APIs for easy migration, and component testing for React and Vue projects.

MITupdated Jul 2026
★ 62repo stars
React Testing
by majesticlabs-dev · majesticlabs-dev/majestic-marketplace

Master React testing through practical patterns for Vitest, React Testing Library, and Jest. This skill covers component and hook testing, form validation, mocking APIs, and integration scenarios with context and routing. Apply behavior-focused testing practices to catch real bugs and build confidence in your code.

no license declared → metadata onlyupdated May 2026
★ 44repo stars
Jest React Testing
by manutej · manutej/luxor-claude-marketplace

This skill teaches you to test React components effectively using Jest and React Testing Library. You'll learn configuration setup, query strategies, mocking techniques, async testing patterns, custom hooks testing, and integration approaches that follow user-behavior-first principles.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars
Testing Qa
by jmsktm · jmsktm/claude-settings

Strengthen your quality assurance foundation with structured guidance on testing methodologies and proven best practices. This skill covers the core principles of test planning, execution strategies, and quality validation techniques used across development teams. Build confidence in designing effective test cases and implementing comprehensive QA workflows.

no license declared → metadata onlyupdated Jan 2026
★ 7repo stars
vitest-testing-patterns
by curiositech · curiositech/some_claude_skills

Master test writing with Vitest and React Testing Library through practical patterns for units, components, and integration scenarios. Learn mocking strategies for APIs and external dependencies, plus file organization and coverage setup.

MITfor claude-codeupdated Jul 2026
★ 164repo stars
React Native Testing
by pluginagentmarketplace · pluginagentmarketplace/custom-plugin-react-native

This skill equips you with practical testing techniques tailored for React Native development. Discover how to configure your test environment, write effective test cases, and validate your mobile applications through hands-on guidance.

no license declared → metadata onlyupdated Jan 2026
★ 9repo stars

More skills react-testing (MIT) · react-testing-library (MIT) · Testing Strategist (MIT)

Tags
unit-testingtest-automationmock-frameworksnapshot-regressioncode-coveragereact-component-testingasync-testingtype-safe-mockingtest-runnerci-cd-testing