DEV Community

Discussion on: Using Mochawesome Reporter with Cypress

Collapse
 
turner749 profile image
Alexander K Turner •

Hello people, for those having issues with the posttest step and the combine-reports npm script I have a fix.
It looks like the newer versions of mochawesome-merge removed the --reportDIr.
I had to replace the combine-reports script slightly.
Inside package.json:
"combine-reports": "mochawesome-merge ./cypress/reports/mocha/*.json > cypress/reports/mochareports/report.json",

Notice the reportDir is gone and instead its a file directory starting with "." and ending with "*.json"

Loved the tutorial it was super helpful, but I did get caught up on this issue for awhile. Hopefully you'll be able to update this because this guide is incredibly helpful! Thanks!

Collapse
 
bushraalam profile image
Bushra Alam •

Thank you Alexander.. I have updated the post.
I am sorry.. I should have done that long ago.
Thanks again.

Collapse
 
krisluminar profile image
Kris Luminar •

@bushraalam You missed the ./ in your update. I should be mochawesome-merge ./cypress, not mochawesome-merge cypress