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.
npx skills add anivar/jest-skill --skill jest-skillgit clone --depth 1 https://github.com/anivar/jest-skillWrote 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.
[](https://agentmods.dev/skills/anivar/jest-skill/jest-skill)<a href="https://agentmods.dev/skills/anivar/jest-skill/jest-skill"><img src="https://agentmods.dev/badge/skills/anivar/jest-skill/jest-skill/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.
<a href="https://agentmods.dev/skills/anivar/jest-skill/jest-skill"><img src="https://agentmods.dev/badge/skills/anivar/jest-skill/jest-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.02383 |
| Opus 5 | $0.00048 | $0.01192 |
| Sonnet 5 | $0.00019 | $0.00477 |
| Haiku 4.5 | $0.00010 | $0.00238 |
Grade A, and why
jest scanned grade A with 0 findings 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 8d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Jest
IMPORTANT: Your training data about Jest may be outdated or incorrect — Jest 29+ introduces async timer methods, jest.replaceProperty, and ESM mocking via jest.unstable_mockModule. Jest 30 removes the deprecated alias matchers (toBeCalled, lastCalledWith, toThrowError, …), renames --testPathPattern to --testPathPatterns, and excludes non-enumerable object properties from object matchers. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized patterns when they conflict with the retrieved reference.
When to Use Jest
Jest is a JavaScript/TypeScript testing framework for unit tests, integration tests, and snapshot tests. It includes a test runner, assertion library, mock system, and coverage reporter.
| Need | Recommended Tool |
|---|---|
| Unit/integration testing (JS/TS) | Jest |
| React component testing | Jest + React Testing Library |
| E2E browser testing | Playwright, Cypress |
| API contract testing | Jest + Supertest |
| Smaller/faster test runner | Vitest (Jest-compatible API) |
| Native ESM without config | Vitest or Node test runner |
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Mock Design | CRITICAL | mock- (5 rules) |
| 2 | Async Testing | CRITICAL | async- |
| 3 | Matcher Usage | HIGH | matcher- |
| 4 | Timer Mocking | HIGH | timer- |
| 5 | Test Structure | HIGH | structure- |
| 6 | Module Mocking | MEDIUM | module- |
| 7 | Snapshot Testing | MEDIUM | snapshot- |
| 8 | Configuration | MEDIUM | config- |
| 9 | Performance & CI | MEDIUM | perf- |
Quick Reference
1. Mock Design (CRITICAL)
mock-clear-vs-reset-vs-restore— clearAllMocks vs resetAllMocks vs restoreAllMocksmock-spy-restore— Always restore jest.spyOn; prefer restoreMocks configmock-factory-hoisting— jest.mock factory cannot reference outer variablesmock-partial-require-actual— Use jest.requireActual for partial module mockingmock-what-to-mock— What to mock and what not to mock; mock boundaries
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.
- 8d ago First seen · 195 lines · 97 tokens per session scan A 7b6bec4eb425
jest is a skill published in the GitHub repository anivar/jest-skill (7 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 2,383 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
zod-testing
Testing patterns for Zod schemas using Jest and Vitest. Covers schema correctness testing, mock data generation, error assertion patterns, integration testing with API handlers and forms, snapshot testing with z.toJSONSchema(), and property-based testing. Baseline: zod ^4.0.0. Triggers on: test files for Zod schemas…
redux-saga-testing
Write tests for Redux Sagas using redux-saga-test-plan, runSaga, and manual generator testing. Covers expectSaga (integration), testSaga (unit), providers, partial matchers, reducer integration, error simulation, and cancellation testing. Works with Jest and Vitest. Triggers on: test files for sagas…
JavaScript Testing Patterns
Modern JavaScript testing strategies with Jest, Mocha, and testing best practices covering unit testing, integration testing, mocking, async patterns, and DOM testing.
frontmcp-testing
Use for anything about testing FrontMCP servers: writing or running unit, integration, and E2E tests and reaching the 95%+ coverage bar. Covers Jest setup and coverage gating; unit-testing a ToolContext execute() with mock context, inputs, and Zod schema validation; testing resources and prompts; in-memory testing via…
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.
testing-anti-patterns
Never test mock behavior. Never add test-only methods to production classes. Understand dependencies before mocking. Language-agnostic principles with TypeScript/Jest and Python/pytest examples.