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

feat(jest-core): allow using Summary Reporter as stand-alone reporter #12687

Merged
merged 2 commits into from Apr 18, 2022

Conversation

mrazauskas
Copy link
Contributor

@mrazauskas mrazauskas commented Apr 18, 2022

Inspired by rickhanlonii/jest-silent-reporter#29

Summary

Currently there is no way to use only Summary Reporter. For instance, it might be useful together with Silent Reporter or simply as stand-alone reporter (that’s even more silent, why not?).

This idea came to my mind, while refactoring setupReporters() logic. Hence, this PR simplifies logic, adds more tests and one nice feature.

Test plan

More tests added. All should pass.

SimenB
SimenB approved these changes Apr 18, 2022
Copy link
Collaborator

@SimenB SimenB left a comment

I like it!

@SimenB SimenB merged commit dd972da into facebook:main Apr 18, 2022
75 checks passed
@mrazauskas mrazauskas deleted the feat-summary-report branch Apr 18, 2022
@Hypnosphi
Copy link

Hypnosphi commented May 3, 2022

Before this change, all the custom reporters were being added after the built-in ones like CoverageReporter: https://github.com/facebook/jest/pull/12687/files#diff-18559c2ed95cf75fe249b47a0c70cf994dc0fa2a2f34727df4e6eb2f0e683cc5L370
This way it was possible to use coverageMap in a custom reporter. Now they are added before. I think this should be marked as a breaking change in the changelog

@mrazauskas
Copy link
Contributor Author

mrazauskas commented May 3, 2022

Ah.. Right, did not realise there could be such use case. Easy to move coverage reporter before custom. It felt like it makes sense to keep summary as the last one. Or?

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants