Search code examples
webstorm

WebStorm not able to change default mocha reporter


I am passing in --reporter Mochawesome in 'Edit Configuration'.

But WebStorm console shows both the reporters.

--reporter mochawesome as well as

--reporter /Applications/WebStorm.app/Contents/plugins/NodeJS/js/mocha-intellij/lib/mochaIntellijReporter.js

No mochawesome report is created.

How to generate Mochawesome reports using WebStorm?

Nodejs run configuration enter image description here


Solution

  • WebStorm uses its own reporter to represent test results as a tree view with filters/navigation etc. So you can't use other reporters when using Mocha integration. If you prefer getting output produced by other reporters instead, you have to run Mocha with Node.js run configuration