Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

babel-jest

Package Overview
Dependencies
Maintainers
7
Versions
301
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-jest

Jest plugin to use babel for transformation.

Source
npmnpm
Version
24.7.1
Version published
Weekly downloads
49M
-2.45%
Maintainers
7
Weekly downloads
 
Created
Source

babel-jest

Babel jest plugin

Usage

If you are already using jest-cli, just add babel-jest and it will automatically compile JavaScript code using Babel.

yarn add --dev babel-jest @babel/core

If you would like to write your own preprocessor, uninstall and delete babel-jest and set the config.transform option to your preprocessor.

Setup

Note: this step is only required if you are using babel-jest with additional code preprocessors.

To explicitly define babel-jest as a transformer for your JavaScript code, map .js files to the babel-jest module.

"transform": {
  "^.+\\.jsx?$": "babel-jest"
},

FAQs

Package last updated on 04 Apr 2019

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