Skip to content

Conversation

@tkrop
Copy link
Owner

@tkrop tkrop commented Nov 18, 2025

This pull request enables the reporter to be reused in multiple test scenarios, i.e. on *testing.T, *testing.B, *testing.TB, and test.Test, which allows to implement common setup functions for tests and benchmarks. As external sign, it also actively implements test.Test to embed test.Reporter.

To allow for testing of the additional edge cases, the test.Context now supports to change the expectation during the test setup. To avoid duplication of setup, I removed in a breaking change the expectation from the test.New(...) function - that usually should not be used by consumers - may be I should not have exported it in the first place.

@tkrop tkrop self-assigned this Nov 18, 2025
@tkrop tkrop added the enhancement New feature or request label Nov 18, 2025
@tkrop tkrop merged commit f4013b9 into main Nov 18, 2025
9 of 13 checks passed
@tkrop tkrop deleted the reporter branch November 18, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants