jest-esm-issues

Community

Resolve Jest ESM/CJS mismatches in tests quickly.

AuthorPeterCowling
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves Jest ESM/CJS compatibility issues in mixed-module codebases, reducing friction during test runs in monorepos.

Core Features & Use Cases

  • Guided diagnostics for ESM/CJS errors in Jest.
  • CJS-forcing workflow to normalize test execution across packages.
  • Use Case: When tests fail with messages like Cannot use import statement outside a module, apply this Skill to switch to CJS mode and restore test execution.

Quick Start

Run the test suite with CJS forced: JEST_FORCE_CJS=1 pnpm --filter <pkg> test -- path/to/file.test.ts

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: jest-esm-issues
Download link: https://github.com/PeterCowling/base-shop/archive/main.zip#jest-esm-issues

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.