I am trying to use mochawesome-report-generator to generate a standalone report, and here's my script to run it:
"generate-test-report":"marge ./mochawesome-report/mochawesome.json -i -f testReport"
The trouble is, I keep getting this error, trying for hours and cannot fix the problem:
Some files could not be processed:
./mochawesome-report/mochawesome.json
Invalid value null supplied to /meta/marge/options: Object
The strange thing is that the mochawesome.json file is not NULL, it is the output of running:
"mocha test --reporter mochawesome"
And the mochawesome.html file (which is also created with the .json file) works fine. So I am assuming that the .json file is created correctly.
Why do I get that error? Thanks for your help!
(P.S. mochawesome.html can only be opened with dependencies, which is why I need that standalone report)
So, I figured out how to resolve this issue. In order for mochawesome-report-generator to work properly, make sure
html=false
when you use mochawesome, so that only the raw json file is generated. (However, why this is the case remains unresolved)