Recipe to test your ES6 React components.
$ npm install gulp gulp-util gulp-mocha gulp-istanbul isparta run-sequence babel jsdom
Note: You must name all your files .js
, even if they contains JSX, or istanbul will not instrument them.
gulp test
: Run unit testsgulp test:coverage
: Run unit tests with code coverage (the report is stored in ./coverage)gulp tdd
: Watch files and run unit tests (without coverage) on changes