-
Notifications
You must be signed in to change notification settings - Fork 111
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
Why is testResultsProcessor support deprecated? #56
Comments
@johngrogg I don't know why result processor is deprecated. However if you want to avoid generating the junit file in dev you can have a jest config dedicated for CI environment that overrides the reporters config. Here is an example of const baseConfig = require('./jest.config');
module.exports = {
...baseConfig,
"reporters": [ "jest-junit"]
} Then you run |
@johngrogg it's deprecated because testResultsProcessor will eventually be removed from Jest and I wanted to start preparing jest-junit users to switch to reporters. Reporters and testResultsProcessor offers almost exactly the same API. Another compelling reason is @sarod recent feature. I'm sure there will be more like this. The reporter API offers the ability to use functions for configuration whereas a testResultsProcessor doesn't offer this capability. So what I would recommend is either trying multiple jest configs (one for local one for CI) or utilize the CI environment variable and have a jest config that reacts to the presence of this environment variable. |
@palmerj3 Ahh, that makes sense now. I hadn't seen anything in the jest documentation about that being eventually removed from Jest. I also hadn't thought about using specific config files (I've just been using the package.json "jest" section). Thanks for the advice. You may want to update the documentation of this with a simple example of how to do what @sarod described above. |
Instead of
you can do this:
|
I'm wondering why
jest --ci --testResultsProcessor="jest-junit"
is a deprecated pattern? It's super useful to set the results processor at the command line for CI environments (no need to have the junit file artifact generated when running tests locally).The text was updated successfully, but these errors were encountered: