https://github.com/davidkhahn/react-enzyme-cra
Enzyme, React Component Snapshots, Redux: Reducers & Actions testing (npm Redux-Mock-Store) Review
https://github.com/davidkhahn/react-enzyme-cra
enzyme-testing react-components snapshot-testing
Last synced: about 2 months ago
JSON representation
Enzyme, React Component Snapshots, Redux: Reducers & Actions testing (npm Redux-Mock-Store) Review
- Host: GitHub
- URL: https://github.com/davidkhahn/react-enzyme-cra
- Owner: DavidKHahn
- Created: 2019-10-07T22:52:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T02:43:23.000Z (over 6 years ago)
- Last Synced: 2025-02-28T13:56:34.667Z (over 1 year ago)
- Topics: enzyme-testing, react-components, snapshot-testing
- Language: JavaScript
- Homepage:
- Size: 261 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To get started with **enzyme**, you can simply install it via npm. You will need to install enzyme along with an Adapter corresponding to the version of react (or other UI Component library) you are using. For instance, if you are using enzyme with React 16, you can run:
``
npm i --save-dev enzyme enzyme-adapter-react-16
``
Each adapter may have additional peer dependencies which you will need to install as well. For instance, enzyme-adapter-react-16 has peer dependencies on react and react-dom.
Source: https://github.com/airbnb/enzyme
**USEFUL LINKS:**
- ##### Lean Testing or Why Unit Tests are Worse than You Think: https://blog.usejournal.com/lean-testing-or-why-unit-tests-are-worse-than-you-think-b6500139a009
- https://www.npmjs.com/package/nock (setup for mock pretend url calls for asynchronous tests)
- https://www.npmjs.com/package/supertest (API testing)