-
Couldn't load subscription status.
- Fork 1.4k
Honor TestArgs TestRenderer throughout zio-test machinery #7647
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
Honor TestArgs TestRenderer throughout zio-test machinery #7647
Conversation
…everal places that are currently hardcoded to ConsoleRenderer
Add typed Renderer value to TestArgs. Check if this is a desirable change.
Struggling with this stupid <LOCATION> bit in my failure assertion.
| val sharedSinkLayer = sinkLayer(console, ConsoleEventRenderer) | ||
| val testArgs = TestArgs.parse(args) | ||
|
|
||
| renderer = testArgs.testRenderer // Ensures summary is pretty in same style as rest of the test output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmemcpy I think this obviates the need for TestArgs.printSummary, at least for some cases.
| console <- ZIO.console | ||
| testArgs = TestArgs.parse(args.getArgs.toArray) | ||
| summary <- runSpecAsApp(spec, testArgs, console) | ||
| _ <- ZIO.when(testArgs.printSummary) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmemcpy I think we can remove this guard now, since we're always going to use the correct TestRenderer, and the IntellijTestRenderer will just be an empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We had some hard-coded
ConsoleRendererreferences that are now properTestRendererparameters.This should resolve #7241 by giving users the ability to specify which
TestRendererto use.Unrelated - Fixed timing of tests for the XML test reports.