https://github.com/lhns/munit-tagless-final
Integration library for MUnit and any effect type via cats-effect
https://github.com/lhns/munit-tagless-final
cats cats-effect munit scala tagless-final testing
Last synced: 8 months ago
JSON representation
Integration library for MUnit and any effect type via cats-effect
- Host: GitHub
- URL: https://github.com/lhns/munit-tagless-final
- Owner: lhns
- License: apache-2.0
- Created: 2021-01-23T20:47:33.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-08-25T00:27:38.000Z (10 months ago)
- Last Synced: 2025-08-31T20:46:04.500Z (10 months ago)
- Topics: cats, cats-effect, munit, scala, tagless-final, testing
- Language: Scala
- Homepage:
- Size: 215 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# munit-tagless-final
[](https://github.com/lhns/munit-tagless-final/actions?query=workflow%3Atest)
[](https://github.com/lhns/munit-tagless-final/releases/latest)
[](https://search.maven.org/artifact/de.lhns/munit-tagless-final_2.13)
[](https://www.apache.org/licenses/LICENSE-2.0)
[](https://scala-steward.org)
Integration library for [MUnit](https://scalameta.org/munit/) and any effect type
via [cats-effect](https://github.com/typelevel/cats-effect/).
This project is based on [typelevel/munit-cats-effect](https://github.com/typelevel/munit-cats-effect).
### build.sbt
```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
```scala
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
```scala
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.