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

Add TestAspects afterFailure and afterSuccess #8588

Merged
merged 1 commit into from Dec 29, 2023

Conversation

hanneshauer
Copy link
Contributor

Currently there is no way (that I'm aware of) to react to a test failing or succeeding in zio-test.
I've created TestAspects for this use case that I think might be helpful to others too.

My use case for these is making sure that specification files are only generated once a ZIOSpec has verified that the application indeed adheres to the desired spec, thus avoiding generating a file that does not match application behaviour.

Ideally, there'd also be a similar TestAspect for a Spec instead of single tests to only execute an effect once a set of tests (e.g. all of a ZIOSpec), but I have not found a way to evaluate a Spec and retrieve it's result (or failure) from within an aspect; if there are any I'd look into adding such an aspect as well.

@CLAassistant
Copy link

CLAassistant commented Dec 28, 2023

CLA assistant check
All committers have signed the CLA.

@adamgfraser adamgfraser merged commit e418445 into zio:series/2.x Dec 29, 2023
20 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.

None yet

3 participants