Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/the-road-to-learn-react/react-testing-mocha-chai-enzyme

A solid test setup for React components with Mocha, Chai, Sinon, Enzyme in a Webpack/Babel application.
https://github.com/the-road-to-learn-react/react-testing-mocha-chai-enzyme

babel chai coverage coverage-report coverage-testing coveralls enzyme jest mocha react reactjs sinon travis travis-ci webpack

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# react-testing-mocha-chai-enzyme

[![Build Status](https://travis-ci.org/the-road-to-learn-react/react-testing-mocha-chai-enzyme.svg?branch=master)](https://travis-ci.org/the-road-to-learn-react/react-testing-mocha-chai-enzyme) [![Coverage Status](https://coveralls.io/repos/github/the-road-to-learn-react/react-testing-mocha-chai-enzyme/badge.svg?branch=master)](https://coveralls.io/github/the-road-to-learn-react/react-testing-mocha-chai-enzyme?branch=master) [![Slack](https://slack-the-road-to-learn-react.wieruch.com/badge.svg)](https://slack-the-road-to-learn-react.wieruch.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/the-road-to-learn-react/react-testing-mocha-chai-enzyme.svg)](https://greenkeeper.io/)

A test setup for React components with Mocha, Chai and Enzyme in a [React + Webpack](https://github.com/the-road-to-learn-react/minimal-react-webpack-babel-setup) application. [Read more about it.](https://www.robinwieruch.de/react-testing-mocha-chai-enzyme-sinon/)

**Optional:**

- [Cypress Tutorial](https://www.robinwieruch.de/react-testing-cypress/)
- [CI Tutorial](https://www.robinwieruch.de/javascript-continuous-integration/)
- [Test Coverage Tutorial](https://www.robinwieruch.de/javascript-test-coverage/)

**Recommended alternative: Instead of Mocha/Chai, [using Jest as test runner and assertion library](https://github.com/the-road-to-learn-react/react-testing-jest-enzyme/).**

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