Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 700 Bytes

jest.md

File metadata and controls

33 lines (28 loc) · 700 Bytes

Using Jest with Enzyme

If you are using Jest with enzyme and using Jest's "automocking" feature, you will need to mark several modules to be unmocked in your package.json:

/* package.json */

"jest": {
  "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
  "unmockedModulePathPatterns": [
    "react",
    "react-dom",
    "react-addons-test-utils",
    "fbjs",
    "enzyme",
    "cheerio",
    "htmlparser2",
    "lodash",
    "domhandler",
    "object.assign",
    "define-properties",
    "function-bind",
    "object-keys",
    "object.values",
    "es-abstract"
  ]
}

Example Projects