Skip to content

Andarist/babel-7-jest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Languages

  • JavaScript 100.0%