You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your test class extends RTS, you can use unsafeRunSync on your IO to run it and receive an ExitResult[E, A] when it's completed. You can then use pattern matching on the ExitResult (or use toEither) to check if it was a success or failure.
You can also use unsafeRun directly to get an A but it will throw an exception in case of error.
Hello,
I have been writing a project using Scalaz-Zio and using
IO[A]
throughout the project.However, I am puzzled on how to write test for it.
How do I use
assert(true, ...)
when my value isIO[Error, Boolean]
?Or
assert(HaveSucceed, ...)
?Thank you.
The text was updated successfully, but these errors were encountered: