Please check the following link:
https://github.com/pghalliday/grunt-mocha-test
Here you get the complete example, may it'll help you..
You can use Mochawesome. It is a custom reporter for use with the Javascript testing framework, mocha. It generates a nice HTML/CSS report that helps visualize your test suites.
First, you need to install the plugin:
npm install --save-dev mochawesome
Then you change your grunt-mocha-test reporter:
mochaTest: {
test: {
options: {
reporter: 'mochawesome', //You need to change this !
colors: true,
summery: true,
captureFile: 'results.html',
quiet: false,
clearRequireCache: true
},
src: ['test/*spec.js'],
excludes: ['plugins']
},
'travis-cov': {
options: {
reporter: 'travis-cov'
}
}
},