Skip to content

A solid test setup for React components with Mocha, Chai, Sinon, Enzyme in a Webpack/Babel application.

Notifications You must be signed in to change notification settings

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 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