Successes
Start with importing the following :
import weaver._
import cats.effect._
object MySuite extends SimpleIOSuite {
val randomUUID = IO(java.util.UUID.randomUUID())
test("hello side-effects") {
for {
x <- randomUUID
y <- randomUUID
} yield expect(x != y)
}
}
object MyAnotherSuite extends SimpleIOSuite {
import scala.util.Random.alphanumeric
val randomString = IO(alphanumeric.take(10).mkString(""))
test("double reversing is identity") {
for {
x <- randomString
} yield expect(x == x.reverse.reverse)
}
}
The report looks like this:
MySuite
+ hello side-effects 13ms
MyAnotherSuite
+ double reversing is identity 1ms
Total 2, Failed 0, Passed 2, Ignored 0, Cancelled 0