Skip to content

Integration library for MUnit and any effect type via cats-effect

License

Notifications You must be signed in to change notification settings

lhns/munit-tagless-final

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

munit-tagless-final

Test Workflow Release Notes Maven Central Apache License 2.0 Scala Steward badge

Integration library for MUnit and any effect type via cats-effect.

This project is based on typelevel/munit-cats-effect.

build.sbt

// use this snippet for cats-effect 3 and the JVM
libraryDependencies += "de.lhns" %% "munit-tagless-final" % "0.3.0" % Test

// use this snippet for cats-effect 3 and JS, or cross-building
libraryDependencies += "de.lhns" %%% "munit-tagless-final" % "0.3.0" % Test

Example

Cats Effect 3

import cats.effect.{IO, unsafe}

import scala.concurrent.Future

abstract class CatsEffectSuite extends TaglessFinalSuite[IO] {
  override protected def toFuture[A](f: IO[A]): Future[A] = f.unsafeToFuture()(unsafe.IORuntime.global)
}

Monix

import monix.eval.Task
import monix.execution.Scheduler

import scala.concurrent.Future

abstract class TaskSuite extends munit.TaglessFinalSuite[Task] {
  override protected def toFuture[A](f: Task[A]): Future[A] = f.runToFuture(Scheduler.global)
}

License

This project uses the Apache 2.0 License. See the file called LICENSE.

About

Integration library for MUnit and any effect type via cats-effect

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages