Skip to content

mkristo/jest-babel-preprocessor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jest-babel-preprocessor

install

npm i --D jest-cli jest-babel-preprocessor

use

On postinstall jest-babel-preprocessor will update the dependent package's package.json to add jest.scriptPreprocessor & jest.unmockedModulePathPatterns fields if they do not exist.

i.e.:

in your package.json set the jest.scriptPreprocessor field:

{
  "jest": {
    "scriptPreprocessor": "<rootDir>/node_modules/jest-babel-preprocessor/preprocessor.js"
    "unmockedModulePathPatterns": [
      "<rootDir>/node_modules/react"
    ]
  }
}

About

Babel preprocessor for Jest

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%