Skip to content

the-road-to-learn-react/react-testing-mocha-chai-enzyme

Repository files navigation

react-testing-mocha-chai-enzyme

Build Status Coverage Status Slack Greenkeeper badge

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.

Features

  • React
  • Webpack
  • Testing
    • Mocha, Chai, Enzyme: Unit/Integration
    • Optional E2E Tests: Cypress
    • Optional CI: Travis CI
    • Optional Reporting: Coveralls.io

Installation

  • git clone [email protected]: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