A test setup for React components with Mocha, Chai and Enzyme in a React + Webpack application. Read more about it.
Optional:
Recommended alternative: Instead of Mocha/Chai, using Jest as test runner and assertion library.
- React
- Webpack
- Testing
- Mocha, Chai, Enzyme: Unit/Integration
- Optional E2E Tests: Cypress
- Optional CI: Travis CI
- Optional Reporting: Coveralls.io
git clone git@github.com:the-road-to-learn-react/react-testing-mocha-chai-enzyme.git
- cd react-testing-mocha-chai-enzyme
- npm install
- npm start
- visit
http://localhost:8080/
- npm test