Functional Programming, Scala, Unit Testing, Zio, Zio Effects.
square: Int => Int = x => x * x def squareSpec: ZIO[Any, Nothing, TestResult] = check(test("square test") { assert(square(2), equalTo(4)) }) In this example, the squareSpec function defines a unit test for the square function. It takes an integer and returns its square. The test uses the assert