-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement support for multiple reporters #2091
Implement support for multiple reporters #2091
Conversation
I've been thinking now that I'm a bit more familiar with the mocha codebase. The current option of passing reporters outputfiles like: I agree that if you execute two console specific reporters, it won't look nice ;), but I don't think there's really something we can do in that case, except throw. Maybe the best approach is to always handle the output file through Comments? |
This would greatly improve our CI builds right now, where we have to do multiple runs of |
I didn't have much feedback about the PR, but I guess I'll do the things I mentioned on my previous message and provide a new PR in any case. You might want to try out the branch that includes the change. You need to pass the file output on the - Example:
|
Hey guys, were they any updates to this it looks like there are conflicts but all tests have passed |
Hi all – thanks for the work @santiagoaguiar! We'll try giving some feedback this week. |
Great! As I mentioned, I think we should remove the If you think it's ok, I'll be glad to finish up this PR later today and submit those changes. Thanks! |
This might be a good place to use subargs |
Closing this PR in favor of #2184. |
Continuation of #1772, rebased from latest.
Besides merging latest with the code @benvinegar & @misterdjules wrote, this PR also:
process.stdout.write
to use theBase
write method, and to inherit fromBase
if they didn't. If we don't want to inherit fromBase
from those reporters, which was the approach from the previous PR, I guess we can pass the stream through the options argument. I didn't touch reporters that used colors/cursors.reporterOptions
when there were multiple reporters.json
reporter writes to the file specified by the<reporter>:<outputPath>
option.They are two independent commits in case we don't want to do the inherit from
Base
change, otherwise I can squash them if necessary.Comments welcome, more than eager to see this pull through. Thanks!