jest-docs

jest-docs is a skill for Claude Code, Codex from pledgeandgrow/pledge-skills. It costs 32 tokens per session (1,278 once invoked), scanned A, original, MIT.

A reference guide for Jest 30, a JavaScript testing framework used to check whether code behaves as expected. It covers assertions, asynchronous tests, mocks, snapshots, timers, coverage, and configuration.

In plain words
What is it for?
Use it to write and configure JavaScript tests, mock functions or modules, test asynchronous code, create snapshots, measure coverage, or migrate Jest tests.
Why use it?
It gives the coding agent the correct Jest syntax and options for the documented version. This helps avoid incorrect tests or test setup.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write and configure JavaScript tests, mock functions or modules, test asynchronous code, create snapshots, measure coverage, or migrate Jest tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pledgeandgrow/pledge-skills/jest
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pledgeandgrow/pledge-skills --skill jest
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jest-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/jest/github.svg)](https://agentmods.dev/skills/pledgeandgrow/pledge-skills/jest)
Your own site
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/jest"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/jest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jest-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/pledgeandgrow/pledge-skills/jest"><img src="https://agentmods.dev/badge/skills/pledgeandgrow/pledge-skills/jest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01278
Opus 5 $0.00016 $0.00639
Sonnet 5 $0.00006 $0.00256
Haiku 4.5 $0.00003 $0.00128

Measured 11d ago against content hash 3533be15deae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

jest-docs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

axios.get.mockResolvedValue({ data: { name: 'Bob' } });
skills/jest/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Jest Skill

Jest — A delightful JavaScript testing framework with a focus on simplicity. Version: Jest 30.x | Docs: jestjs.io

Quick Reference

Topic File Sections
Getting Started & Core Concepts getting-started.md Installation, first test, CLI usage, configuration (Babel, TypeScript, bundlers, ESLint), matchers, async testing, setup/teardown, mock functions
API Reference api.md Globals (test, describe, before/after hooks, .each, .concurrent, .failing, .todo), expect matchers, jest object (mock modules, mock functions, fake timers, misc), mock function API, CLI options, configuration options
Guides & Advanced guides.md Snapshot testing, timer mocks, manual mocks, ECMAScript modules, webpack integration, watch plugins, migration guide, testing frameworks (React/Vue/Angular/Express/Next.js), Puppeteer, MongoDB, DynamoDB, architecture

Core Concepts

  • Test Runner: Jest runs tests in parallel with isolated environments for speed and reliability
  • Assertions: Use expect() with matchers like toBe(), toEqual(), toContain(), toThrow()
  • Mock Functions: jest.fn() creates mock functions to test code links, capture calls, and configure return values
  • Mock Modules: jest.mock() replaces module dependencies with mocks for isolated testing
  • Snapshot Testing: Captures serialized output and compares against a reference snapshot file
  • Fake Timers: jest.useFakeTimers() replaces native timer functions for controlled time advancement
  • Code Coverage: Built-in coverage reporting via --coverage flag with Istanbul/V8 providers
  • Watch Mode: --watch re-runs only tests related to changed files for fast development feedback
  • Configuration: jest.config.js, package.json "jest" key, or CLI flags; supports projects, transforms, moduleNameMapper
  • Test Environment: node (default) or jsdom (browser simulation) or custom environments
  • Parallel Execution: Worker threads/processes with --maxWorkers for optimized CI performance

Read the full file on GitHub · 127 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 127 lines · 32 tokens per session scan A 3533be15deae

Subscribe to this mod's changes

jest-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,278 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

javascript-testing-patterns

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

thapaliyabikendra/ai-artifacts · 63 tokens

test-generator

A skill for creating unit tests, generating mock data or objects, and analysing test coverage. Unit tests check small parts of a program in isolation.

chainlesschain/chainlesschain · 18 tokens

Karma Testing

Comprehensive Karma test runner skill for browser-based JavaScript unit testing with Jasmine, Mocha, or QUnit frameworks, real browser execution, coverage reporting, and CI/CD pipeline integration.

PramodDutta/qaskills · 41 tokens

Code Coverage Analysis

Measure and enforce test coverage with Istanbul/nyc, c8, Jest, and Vitest. Covers branch versus line coverage, per-directory thresholds, CI gates, and correctly excluding generated code from reports.

PramodDutta/qaskills · 45 tokens

jest-expert

Expert in Jest unit testing framework, mocks, snapshots, coverage reports, watch mode, and custom matchers. Use when the user mentions testing, unit testing, JavaScript, QA, mocking, or snapshots, or when the task involves Jest Framework, Test Structure, Advanced Features, or Basic Unit Tests.

personamanagmentlayer/pcl · 65 tokens

test-generator

Generate comprehensive unit, integration, and end-to-end tests. Use when adding test coverage, writing tests for new features, or improving existing test suites.

asgarovf/locusai · 33 tokens