Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one report (doc) generated instead of 3 #54

Closed
scream314 opened this issue Jul 18, 2018 · 3 comments
Closed

Only one report (doc) generated instead of 3 #54

scream314 opened this issue Jul 18, 2018 · 3 comments

Comments

@scream314
Copy link

Running my tests with

mochaOptions: ['--reporter-options', 'spec=-,mocha-bamboo-reporter=./test/mocha-bamboo-reporter.json,doc=./test/docs.html,mocha-junit-reporter=./test/mocha-junit-reporter.xml'],

I get the spec output, the docs.html file gets generated with the correct report, but the files mocha-junit-reporter.xml and mocha-bamboo-reporter.json are empty.

Tried to run with only mochaOptions: ['--reporter-options', 'spec=-,mocha-bamboo-reporter=./test/mocha-bamboo-reporter.json'], with the same results.

Is there a way to have all 4 outputs?

@glenjamin
Copy link
Owner

Do the other 2 reporters print onto standard out? If not then you won’t be able to use mocha multi to control their output destination

@scream314
Copy link
Author

@glenjamin
I am not sure, but probably not.
I also tried to have 3 outputs using mocha-multi-reporters, but it was not working either (I think it was only able to generate the junit report).

Is there any way to have at least spec, mocha-bamboo-reporter and mocha-junit-reporter at the same time without running the tests 3 times?

@glenjamin
Copy link
Owner

I think those reporters take a reporterOptions param themselves, which declares their output file.

I've just merged a PR and released v1.1.0 which allows you to specify reporter options via a JSON file which might give you a way to make this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants