-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
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.
@@ -74,19 +73,13 @@ abstract class ZIOSpecAbstract extends ZIOApp with ZIOSpecAbstractVersionSpecifi | |||
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
ConsoleRenderer
references that are now properTestRenderer
parameters.This should resolve #7241 by giving users the ability to specify which
TestRenderer
to use.Unrelated - Fixed timing of tests for the XML test reports.