Functional Programming, Scala, Unit Testing, Zio, Zio Effects.
console") { for { _ <- TestConsole.feedLines("hello, world!") value <- Program.program } yield assert(value)(equalTo("hello, world!")) } ) } This code defines a ProgramTest object that extends the DefaultRunnableSpec trait. It defines a spec method that contains the unit tests for the Program