You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-jest

Package Overview
Dependencies
Maintainers
1
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-jest - npm Package Compare versions

Comparing version

to
5.0.1

7

index.js

@@ -5,6 +5,11 @@ var babel = require("babel-core");

process: function (src, filename) {
// Allow the stage to be configured by an environment
// variable, but use Babel's default stage (2) if
// no environment variable is specified.
var stage = process.env.BABEL_JEST_STAGE || 2
// Ignore all files within node_modules
// babel files can be .js, .es, .jsx or .es6
if (filename.indexOf("node_modules") === -1 && babel.canCompile(filename)) {
return babel.transform(src, { filename: filename }).code;
return babel.transform(src, { filename: filename, stage: stage }).code;
}

@@ -11,0 +16,0 @@ return src;

2

package.json
{
"name": "babel-jest",
"version": "5.0.0",
"version": "5.0.1",
"repository": "babel/babel-jest",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -31,1 +31,23 @@ # babel-jest

**And you're good to go!**
## Using experimental stages
By default, babel-jest will use Babel's default stage (stage 2).
If you'd like to use one of the other stages, set the environment variable:
`BABEL_JEST_STAGE`
And then you can modify the test command in package.json like so:
```javascript
{
// Normal pakcage.json stuff,
"scripts": {
"test": "BABEL_JEST_STAGE=0 jest"
},
// Normal pakcage.json stuff
}
```