All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.test.results.ExecutionEventJsonPrinter.scala Maven / Gradle / Ivy

There is a newer version: 2.1.9
Show newest version
package zio.test.results

import zio._
import zio.test._

private[test] object ExecutionEventJsonPrinter {
  val live: ZLayer[ResultSerializer with ResultFileOpsJson, Nothing, TestResultPrinter] =
    ZLayer.fromFunction(
      LiveImpl(_, _)
    )

  private case class LiveImpl(serializer: ResultSerializer, resultFileOps: ResultFileOpsJson)
      extends TestResultPrinter {
    override def print[E](event: ExecutionEvent.Test[E]): ZIO[Any, Nothing, Unit] =
      resultFileOps.write(serializer.render(event), append = true).orDie
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy