-
Couldn't load subscription status.
- Fork 1.4k
Description
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?