-
Notifications
You must be signed in to change notification settings - Fork 77
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
Consider adding configuration in reporter declaration #43
Comments
This is a pretty neat idea. Will try to look into it ASAP. |
I'll upvote this idea. Took me a while to understand why the reporters options format wasn't working for this package. It's a bit messy having to spread Jest-related configuration around in multiple files/directories. |
Hi, I am currently working on this feature as I believed it to be a nice improvement of the plugin. As the plugin is designed at the moment, it expects to be run as a testResultsProcessor by default - meaning that it will read the config from The reason the execution mode needs to be defined is because of how Jest requires different exports depending on these modes. If we were to swap the priority order (Custom Reporter being default, and testResultsProcessor needing configuration), it would break the plugin for all users who haven't defined What are your thoughts on this matter? |
Can you do something similar to what they’ve done with jest-junit (which can also be used in both ways)? See https://github.com/jest-community/jest-junit/blob/master/index.js |
@Hargne Thanks for the explanation! |
…porter declaration, Modified the default export to automatically handle if it was invoked as a custom reporter or test result processor, Removed executionMode configuration option, Updated README
@pascalduez @jpicton could you take a look at the PR regarding this (#44) and see if this solves this issue for you? Thanks! |
Cheers @Hargne, the changes look like they're exactly what I was after. |
…laration #43-config-in-reporter-declaration
Added in #44 |
@Hargne Works like a charm, thanks a bunch! |
hi,
We can already use the plugin from a
jest.config.js
as such:But we need to create a
jesthtmlreporter.config.json
.Desired (fits other reporters config api):
The text was updated successfully, but these errors were encountered: