Skip to content

Sneezoo/babel-7-jest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

The Babel team has provided an official solution for the problem that this package was solving. If you want to use jest with babel@7 please just install following:

npm install --save-dev babel-jest @babel/core babel-core@7.0.0-bridge.0

babel-7-jest

Babel jest plugin

babel-jest didn't work with @babel/* packages so I made it to do so.

Setup

npm install --save-dev babel-7-jest

Add it to your jest configuration like this:

"jest": {
  "transform": {
    ".js$": "babel-7-jest"
  }
}

A minimal package.json would look like this:

{
  "name": "example",
  "version": "0.0.1",
  "description": "Example of jest and babel 7",
  "main": "server.js",
  "scripts": {
    "test": "jest",
    "dev:test": "jest --watch"
  },
  "jest": {
    "transform": {
      ".js$": "babel-7-jest"
    }
  },
  "author": "Sneezoo",
  "license": "MIT",
  "devDependencies": {
    "@babel/core": "^7.0.0-beta.31",
    "babel-7-jest": "^21.3.1",
    "jest": "^21.2.1"
  },
  "dependencies": {}
}

Be aware of @babel/core, which you will need to add to your devDepenencies!

For more information have a look at the jest docs

About

babel-jest with babel 7 packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published