jest-advanced

Configure custom Jest matchers, parameterized tests, and coverage reporting.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill jest-advanced
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jest-advanced
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-jest/skills/jest-advanced
Command: npx skills add https://github.com/TheBushidoCollective/han --skill jest-advanced

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Master advanced Jest features including custom matchers, parameterized tests, and performance considerations.

Core Features & Use Cases

  • Custom matchers and TypeScript typings for expectations
  • test.each patterns with arrays, objects, and tagged templates
  • Performance considerations for large test suites

Quick Start

Create a custom matcher, register it, and validate with a test.each example.

Frequently Asked Questions about jest-advanced

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom matchers in Jest for TypeScript projects?

Custom matchers extend Jest's expect API with domain-specific assertions. Define a matcher object with a compare function, register it via expect.extend(), and Jest automatically infers TypeScript types for your custom expectation methods, enabling type-safe validation in unit and integration tests.

What's the best way to run parameterized tests in Jest?

Use test.each to run the same test logic across multiple datasets. Pass arrays, objects, or template literals as parameters, and Jest executes one test case per dataset entry, reducing code duplication and improving coverage for edge cases in JavaScript and TypeScript projects.

Can I use async matchers in Jest for asynchronous validation?

Yes, async matchers support Promise-based validation logic. Return a Promise from your matcher's compare function, and Jest waits for resolution before asserting the result, enabling custom matchers that validate async operations, API responses, or time-dependent behavior.

How do I configure Jest coverage collection and reporting for large test suites?

Adjust coverage thresholds, collection patterns, and reporters in jest.config.js to balance performance with accuracy. Configure coverage paths, exclude node_modules, and tune reporter output to handle scaling challenges in projects with extensive test coverage.

Does Jest support template literal syntax for test.each parameterization?

Yes, test.each accepts tagged template literals for readable, multi-line dataset definitions. Format test cases as backtick strings with pipe-separated columns, and Jest parses headers and data rows automatically, improving maintainability of complex parameterized tests.

What are the performance considerations when scaling Jest test suites?

Large test suites benefit from custom matchers that fail fast, optimized test.each datasets, and targeted coverage collection. Avoid redundant setup, batch async operations, and configure Jest workers to balance test execution speed with system resource constraints.