How to add Mocha reporter to Angular in less than two minutes 👉

Using the Mocha reporter to make your Angular tests prettier and more readable. 😄

1. Install Mocha Reporter.

npm install -D karma-mocha-reporter
yarn add -D karma-mocha-reporter

2. Add the reporter to your karma.conf.js file.

plugins: [ 
...
require('karma-mocha-reporter')
],
reporters: ['progress', 'kjhtml'],
reporters: ['mocha', 'kjhtml'],

Conclusion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store