cypress-plugins: Problem with overriding mochawsome.json

Hi,

If we will run e.g "scripts": { "slack-report": "./node_modules/.bin/cypress-slack-reporter-full", }

Which have:

 mochawesomeReporterOptions: {
            reportDir: "cypress/reports/mocha",
            quiet: true,
            overwrite: true,
            html: false,
            json: true
        }

Overwrite is set to true, so if user will have more then one test the json file will be always overwritten, and we can’t merge couple of reports into one.

Could you check it?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

will all due respect, no, my code is shown working here and tested in CI, and as said, you should read the documentation on the site of the tool you are using

https://github.com/Antontelesh/mochawesome-merge

Checked your circleci run and I can see the issue

https://github.com/YOU54F/cypress-slack-reporter/blob/3625eda87c94736ca62ecd23012c80f0c61dde0a/src/cli/spec.ts#L23

The cli runner does indeed set overwrite to true. Which is why it is creating a new file each time! I’ll update it and publish a new version tomorrow if I get some time!

Will make the doc changes too