Package Exports
- mochawesome
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mochawesome) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mochawesome 
Mochawesome is a custom reporter for use with the Javascript testing framework, mocha. It generates a full fledged HTML/CSS report that helps visualize your test suites.
##Changes as of 1.0.0
- Redesigned report
- Mobile friendly
- Complete refactor of client-side script
- Custom builds of vendor scripts
- Custom font-icon set
- All fonts are now local to the report
##Features
- At-a-glance stats including pass percentage
- Beautiful charts
- Support for nested
describe
s - Supports pending tests
- Filter view by test type
- Review test code inline
- Stack trace for failed tests
- Responsive
- Saves JSON output for further processing
- Offline viewing
##Browser Support Tested to work in Chrome. Should work in any modern web browser including IE9+. Mochawesome generates a self-contained report that can be viewed offline.
##Sample Report

##Usage
- Add Mochawesome to your project:
npm install --save-dev mochawesome
- Tell mocha to use the Mochawesome reporter:
mocha testfile.js --reporter mochawesome --no-exit
Note the --no-exit
option. This must be set or mocha could exit the process before the report has been fully generated
- If using mocha programatically:
var mocha = new Mocha({
reporter: 'mochawesome'
});
##Development If you wish to make changes to the reporter you will need to clone the repo and build locally. Building requires you to have gulp installed.
###Installation
$ git clone https://github.dowjones.net/grubera/mochawesome
###Modifying
Reporter files are found in /lib
directory.
Templates, styles, and client-side scripts are in the /src
directory.
###Building There are several gulp tasks available but the main ones to be aware of are:
####gulp build
- Full Build
Runs jshint, parses LESS, compiles templates, concatenates and minifies scripts.
Note: This task will fail if linting fails.
####gulp watch
- Watch Files
Watches for changes to JS, LESS, and MU and builds when a change is detected. If a change is detected in a JS file this will run jshint first before building and will fail on any lint errors.
####gulp lint
- Lint JS
This will run jshint only, no building will occur.
####gulp test
- Run Test
After building you can run this to test the reporter and see the output.
Note: The default gulp task will run this task.