Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-babel

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-babel

Simple Babel preprocessor for Jest

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-29.26%
Maintainers
1
Weekly downloads
 
Created
Source

Simple Babel preprocessor for Jest

Usage

Install the package:

$ npm install jest-babel --save-dev

Add preprocessor to your package.json:

{
  "scripts": {
    "test": "jest"
  },
  "jest": {
    "scriptPreprocessor": "<rootDir>/node_modules/jest-babel",
    "preprocessorIgnorePatterns": ["/node_modules/"],
    "testFileExtensions": ["es6", "js"],
    "moduleFileExtensions": ["js", "json", "es6"]
  }
}

If you want to transpile your dependencies, you can skip the key preprocessorIgnorePatterns.

Extending default config

By default babel will transform your code with this config:

{
  "stage": 2,
  "retainLines": true,
  "auxiliaryCommentBefore": "istanbul ignore next"
}

You can override or extend it with jest-babel section in your package.json:

{
  "jest-babel": {
    "stage": 1,
    "extensions": ["es6", "customext"]
  }
}

Keywords

FAQs

Package last updated on 12 Oct 2015

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc