adamgruber / mochawesome-report-generator

Standalone mochawesome report generator. Just add test data.
MIT License
234 stars 89 forks source link

.html extension duplication in 6.1.0 #195

Closed ittaibaratz closed 2 years ago

ittaibaratz commented 2 years ago

Hello there!

We have a dependency bot in our repo and in the PR that updates mochawesome-report-generator from version 6.0.1 to 6.1.0, I've noticed that the report file created has html twice in its filename. Is this an expected change?

Thank you!

$ marge cypress/reports/mochawesome-merged.json -o ./cypress/reports -f mochawesome.html --inline
��� Reports saved:

 /home/jenkins/workspace/exc-pueblo_PR-163/cypress/reports/mochawesome.html.html
adamgruber commented 2 years ago

Yes, the reporter no longer strips out .html or .json when used in reportFilename. You can simply update your command to this:

marge cypress/reports/mochawesome-merged.json -o ./cypress/reports -f mochawesome --inline
ittaibaratz commented 2 years ago

@adamgruber thanks for confirming. In my case its a bit tricky because our CI/CD hosts over 100 applications and I can't force them all to upgrade (Or change their command) at the same time, but we can add some logic to strip out double HTMLs. Thanks!

adamgruber commented 2 years ago

So thinking on this more it's a breaking change and should have been a major version bump. I'm going to consider it a regression and put out a bug fix.

ittaibaratz commented 2 years ago

Awesome, thanks @adamgruber !

adamgruber commented 2 years ago

Fixed in mochawesome 7.1.2 (mochawesome-report-generator 6.1.1)

ittaibaratz commented 2 years ago

@adamgruber the dependency bot picked up 6.1.1 and reporting is back. Thanks again!