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

Implement support for environment variable-based reporters #520

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

FWest98
Copy link
Contributor

@FWest98 FWest98 commented Jun 23, 2024

Description

This PR implements support for configuring reporters through environment variables, similar to how this is supported in the C++ version of this library: https://github.com/approvals/ApprovalTests.cpp/blob/master/doc/how_tos/SelectReporterWithEnvironmentVariable.md

The solution

As implementation, I added an additional reporter EnvironmentVariableReporter, that is included by default in the FrontloadedReporter. When no environment variable is specified, this will not change the previous behaviour. When the environment variable is specified, the selected reporter(s) will be used, and will take priority over any other configured reporters - similar to the C++ version.

This particular approach supports specifying multiple reporters separated by a comma. They are then embedded in a MultiReporter.

@LarsEckart LarsEckart requested a review from isidore June 25, 2024 06:18
@LarsEckart
Copy link
Contributor

hello Floris,

thank you for this contribution. I pinged @isidore - we usually invite people to our weekly pair programming session (Mondays, ~18 o'clock Amsterdam time) when we accept contributions. This gives us a chance to hear more about it or provide feedback that we then can immediately implement.

Stay tuned :)

@FWest98
Copy link
Contributor Author

FWest98 commented Jul 16, 2024

Hi Lars!

Is there any update on this?

@LarsEckart
Copy link
Contributor

hey, today is the first time we get together again afetr vacations. We accept this PR but will make a small adjustment and will release it later today. Thank you for this contribution, much appreciated! :)

@LarsEckart LarsEckart merged commit c7d6ee7 into approvals:master Aug 12, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants