Support multiple reporters in browser
See original GitHub issueIs your feature request related to a problem or a nice-to-have?? This is a ‘nice-to-have’
I think it’s awesome that mocha supports running in the browser!
I would like mocha be able to support multiple reporters for the browser - mainly for using ‘json-stream’ with ‘html’. Currently you can only specify one reporter.
Describe the solution you’d like
My first thought would be to have mocha.setup() be able to accept an array reporters instead of just a single string For example:
mocha.setup({
ui: 'bdd',
reporter: ['html', 'json-stream']
});
Another solution would be to have json-stream as an additional option:
mocha.setup({
ui: 'bdd',
reporter: 'html',
jsonStream: true,
});
As a side note I have a one-line hack working in ‘mocha.js’ so I know it’s definitely possible
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Use multiple reporters in Mocha browser? - Stack Overflow
Is it possible to use multiple reporters in the browser version of Mocha? I'm creating a reporter that sends test results to my...
Read more >Adding Multiple reporters to a request - Atlassian Community
Solved: Is there a way i could enable multiple reporters to an issue type? This should ideally show up under people section of...
Read more >testcafe-reporter-multiple-html - npm
This TestCafé reporter generates an HTML report with default support for stackTrace, screenshots sorting and searching. Layout inspired by the ...
Read more >Reporters | Intermediate Guides | Guides | Docs - TestCafe
Reporters · Included Reporters · Community Reporters and Custom Reporters · Install New Reporters · Specify the Reporter · Output data to disk...
Read more >GitHub - wswebcreation/multiple-cucumber-html-reporter
a features overview that can hold multiple runs of the same feature / runs of the same feature on different browsers / devices;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would love the former option, especially for dealing with code coverage, nyc, and artifact output. I want my CI runs to show the results as they are running but also output to an xml file. I’ve tried other hacky npm packages, like mocha-multi, with mixed results and it would be nice if this was first party.
Also I made another one-liner change here: