jest-testing-expert

Configure Jest for JavaScript/TypeScript projects with advanced mocking and snapshot strategies.

Updated Apr 9, 2024
One-click install
npx skills add https://github.com/nhonvo/Powershell --skill jest-testing-expert-nhonvo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jest-testing-expert
Source: https://github.com/nhonvo/Powershell/tree/main/antigrafity-config/.agent/skills/jest-expert
Command: npx skills add https://github.com/nhonvo/Powershell --skill jest-testing-expert-nhonvo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Jest-based testing for complex JS/TS projects, providing expert guidance on configuring environments, advanced mocking, snapshot strategy, async testing, and performance optimization to ensure robust and maintainable test suites.

Core Features & Use Cases

  • Advanced Jest configuration and environment setup for large codebases.
  • Sophisticated mocking strategies, timer control, and module hoisting for deterministic tests.
  • Snapshot testing architecture, serializers, and CI integration for reliability.
  • TypeScript integration and ESM support for modern projects.

Quick Start

Provide your project details and I will generate a tailored Jest strategy and configuration plan.

Frequently Asked Questions about jest-testing-expert

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

FAQPage Schema
How do I configure Jest for a large TypeScript project?

Configuring Jest for large TypeScript projects requires tailored environment setup and TS integration templates to ensure robust test suites. This Skill generates a specific configuration plan addressing TS integration and ESM support for your codebase.

What is the best way to handle module hoisting and mocking in Jest?

Handling mocking in Jest involves sophisticated mock strategies, timer control, and module hoisting to create deterministic tests. This guidance helps implement safe and maintainable mock architectures across JavaScript and TypeScript projects.

How do I set up snapshot testing architecture with serializers in Jest?

Snapshot testing architecture in Jest utilizes custom serializers and CI integration for reliable test outputs. This approach ensures maintainable snapshot strategies that prevent brittle tests across frontend and backend stacks.

Does Jest support ESM modules for modern JavaScript testing?

Jest supports ESM modules for modern JavaScript testing through specific configuration templates and environment setup. This guidance covers ESM support and TS integration to ensure tests run correctly in modern projects.

Why are my Jest async tests failing in Node.js?

Failing Jest async tests in Node.js often stem from improper timer control or unhandled asynchronous boundaries. This provides troubleshooting for async tests, applying sophisticated timer control and mock strategies for deterministic results.