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
Merged

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

merged 2 commits into from
Apr 18, 2022

Conversation

mrazauskas
Copy link
Contributor

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.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

@SimenB SimenB merged commit dd972da into jestjs:main Apr 18, 2022
@mrazauskas mrazauskas deleted the feat-summary-report branch April 18, 2022 11:21
@Hypnosphi
Copy link

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

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.

4 participants