enzyme-adapter-configure

1.0.2 • Public • Published

enzyme-adapter-configure

Configures an enzyme adapter automatically based on your package.json by detecting a React version in dependencies in package.json, or optionally looking for a field enzymeAdapter specifying a module to use, e.g.:

{
  "enzymeAdapter": "enzyme-adapter-react-16",
  "dependencies": {
    "react": "^16.8.1"
  }
}

This makes it easier to integrate with jest (rather than a custom script file), e.g.,:

{
  "setupFilesAfterEnv": ["enzyme-adapter-configure"]
}

Package Sidebar

Install

npm i enzyme-adapter-configure

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3 kB

Total Files

4

Last publish

Collaborators

  • andersdjohnson