thebushidocollective/han/jest-configuration
Claude Code and agent skill by thebushidocollective/han
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Use when jest configuration, setup files, module resolution, and project organization for optimal testing environments.
Install
npx vskill@latest install thebushidocollective/han/jest-configurationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Jest Configuration
Master Jest configuration, setup files, module resolution, and project organization for optimal testing environments. This skill covers all aspects of configuring Jest for modern JavaScript and TypeScript projects, from basic setup to advanced multi-project configurations.
Installation and Setup
Basic Installation
TypeScript Support
React Testing Libraries
Configuration Files
jest.config.js (Recommended)
TypeScript Configuration (jest.config.ts)
Package.json Configuration
Setup Files
jest.setup.js
Setup for React Testing
Module Resolution
Path Mapping
File Mocks
Multi-Project Configuration
Monorepo Setup
Project-Specific Configuration
Environment Configuration
Custom Test Environment
Transform Configuration
Babel Transform
Custom Transformer
Best Practices
- Use TypeScript configuration files for type safety - Leverage TypeScript config files to catch configuration errors at compile time
- Organize tests in `__tests__` directories - Keep tests close to source files for better discoverability
- Set appropriate coverage thresholds - Define realistic coverage goals that balance thoroughness with maintainability
- Use setup files for global configuration - Centralize common setup logic to avoid repetition across test files
- Configure module name mappers for cleaner imports - Use path aliases to make test imports more readable and maintainable
- Separate environment-specific configurations - Use different configs for Node vs browser environments
- Clear mocks between tests - Prevent test pollution by resetting mocks automatically
- Use projects for monorepo setups - Leverage multi-project configuration for better organization
- Configure appropriate timeouts - Set realistic timeouts for async operations to prevent false failures
- Use verbose output during development - Enable detailed logging to aid in debugging test failures
Common Pitfalls
- Forgetting to install required dependencies - Missing @types/jest or testing libraries causes cryptic errors
- Incorrect module resolution paths - Misconfigured moduleNameMapper leads to module not found errors
- Not clearing mocks between tests - Shared mock state causes flaky tests and false positives
- Overly strict coverage thresholds - Unrealistic coverage goals discourage testing and slow development
- Missing transform configuration - Files not being transformed leads to syntax errors in tests
- Conflicting global and local configurations - Package.json config overrides jest.config.js unexpectedly
- Not configuring test environment correctly - Using wrong environment (node vs jsdom) causes undefined errors
- Ignoring setupFilesAfterEnv - Missing global setup causes repetitive boilerplate in every test file
- Not handling CSS/asset imports - Unmocked style imports break tests in Node environment
- Incorrect testMatch patterns - Tests not being discovered due to pattern mismatches
When to Use This Skill
- Setting up Jest in a new project from scratch
- Migrating from another testing framework to Jest
- Configuring Jest for TypeScript projects
- Setting up testing infrastructure for monorepos
- Optimizing Jest configuration for CI/CD pipelines
- Debugging module resolution issues in tests
- Configuring custom test environments
- Setting up path aliases for cleaner imports
- Implementing custom transformers for special file types
- Establishing coverage requirements for your team
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/tools/jest/skills/jest-configuration/SKILL.md
Popularity
- Repository stars
- 122
- Repository forks
- 14
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thebushidocollective/han/jest-configuration)