Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

@vbetsch/config-jest

License: MIT github: repo npm package version npm downloads number per week npm package install size

A modular Jest configuration collection for TypeScript projects, optimized for speed and reliability using modern transformers like SWC.

🧩 Modules

This package provides several configuration modules that can be composed to fit your project's needs:

Module Description
base Core Jest configuration for Node.js and TypeScript.
dom Specialized configuration for browser-like environments (JSDOM).
strict Opinionated high-performance setup using SWC and strict type checking.

🏗️ Installation

We recommend using Node version lts/krypton -> v24.14.1.

Install the NPM package in your project:

npm install -D @vbetsch/config-jest

You have to install @types/jest if you want to write Jest tests in TypeScript.

Note: Depending on the modules you use (e.g., dom or strict), you must also install the corresponding peer dependencies like jest-environment-jsdom or @swc/jest.

  • base:
    • No more dependencies needed
  • dom:
    • jest-environment-jsdom
  • strict:
    • @swc/jest

🚀 Getting started

To use these configurations, import them into your flat jest.config.mjs file:

// NOTE: You can name imports like you want
import baseVbetsch from '@vbetsch/config-jest/base';
import strictVbetsch from '@vbetsch/config-jest/strict';

export default {
  ...baseVbetsch,
  ...strictVbetsch,
};

Check out the vbetsch/lib-config-ts-test repository for a live integration example.

🤝 Contributing

Please refer to the Root README for contribution guidelines.

© 2026 vbetsch — MIT License