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

zio.test.ReporterEventRenderer.scala Maven / Gradle / Ivy

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

import zio.stacktracer.TracingImplicits.disableAutoTrace
import zio.{Chunk, Trace}
import zio.test.render.{ConsoleRenderer, IntelliJRenderer}

trait ReporterEventRenderer {
  def render(event: ExecutionEvent)(implicit trace: Trace): Chunk[String]
}
object ReporterEventRenderer {
  object ConsoleEventRenderer extends ReporterEventRenderer {
    override def render(executionEvent: ExecutionEvent)(implicit trace: Trace): Chunk[String] =
      Chunk.fromIterable(
        ConsoleRenderer
          .render(executionEvent, includeCause = true)
      )
  }

  object IntelliJEventRenderer extends ReporterEventRenderer {
    override def render(executionEvent: ExecutionEvent)(implicit trace: Trace): Chunk[String] =
      Chunk.fromIterable(
        IntelliJRenderer
          .render(executionEvent, includeCause = true)
      )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy