Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ZIO Test: Add Support for Test Annotations #1899

@adamgfraser

Description

@adamgfraser

Now that we have #1664 merged I think the next area to work on for infrastructure for ZIO Test is supporting the test annotations functionality that @jdegoes introduced.

@jdegoes With all tests being effectual now, I am wondering if we can do this in a slightly different way. What if we wrapped the TestAnnotationMap in a Ref and made it available through the environment type as part of TestEnvironment? Conceptually, you could think of test annotations as a more structured logging service or alternatively as a super polymorphic version of the writer monad effect where the normal writer monad can support writing to a log with values of one type that forms a monoid, whereas test annotations support logging arbitrarily many types of values that each form a monoid. I think this could provide a very nice way for us to allow tests to write to and read from test annotations without having to further complicate the return type of tests, which is already not simple, or manually thread the state through. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions