Socket
Socket
Sign inDemoInstall

jest-preset-moon

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-preset-moon

A modern Jest preset for tooling development.


Version published
Maintainers
1
Created
Source

jest-preset-moon

build status npm version npm license

A modern Jest preset that provides code coverage and performance out of the box.

yarn add --dev jest-preset-moon

Setup

Add the preset to your root jest.config.js.

module.exports = {
  preset: 'jest-preset-moon',
};

Features

  • Configured for Node.js environments by default.
  • Defines an empty file mock for non-JS/TS files (like CSS).
  • Requires 90% code coverage of all source files.
  • Improved performance through the Jest Circus runner.
  • Supports __DEV__, __PROD__, and __TEST__ globals.

Requirements

  • Source files must be located in a src folder.
  • Tests files must end in *.test.* and be located within a tests or __tests__ folder.
  • Includes a setup file at <rootDir>/tests/setup.ts (if exists).
  • Relies on Babel, the TypeScript plugin, and the default babel-jest package.

Keywords

FAQs

Package last updated on 09 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc