CheckOps home

Tools directory

M

CheckOps

MUnit

MUnit is an Apache-2.0 Scala testing library from Scalameta with a minimal JUnit-based API, actionable error messages with diffs, fixtures and support for JVM, Scala.js and Scala Native.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

MUnit is a Scala testing library with actionable errors and extensible APIs, maintained by the Scalameta organisation. It deliberately keeps a small API: test suites extend munit.FunSuite, tests are declared with test("name") { ... }, and assertions are assert, assertEquals, assertNotEquals, intercept and a few others. That simplicity makes it fast to learn and quick to compile.

MUnit is implemented as a JUnit runner, so it works with sbt, Maven, Gradle and IDEs that understand JUnit, and it supports Scala 2 and 3 across JVM, Scala.js and Scala Native. Failure messages include colourful diffs and source locations, making them easy to act on. Features include test-local and suite-local fixtures, Future-returning tests, tags and filtering, flaky-test marking, and integrations for ScalaCheck (munit-scalacheck) and Cats Effect (munit-cats-effect). Version 1.3.6 was released on 3 September 2026.

The source code is at scalameta/munit on GitHub under the Apache-2.0 licence, with about 474 stars; the most recent commit was on 5 November 2026.

Features

  1. Minimal API: Small, easy-to-learn surface.
  2. Actionable errors: Diffs and source locations on failure.
  3. JUnit-based: Works with standard build tools and IDEs.
  4. Cross-platform: JVM, Scala.js and Scala Native.

Pros

  1. Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 5 November 2026.

Cons

  1. Fewer styles: No BDD-style specs like ScalaTest’s WordSpec.
  2. Smaller matcher set: Plain assertions rather than a matcher DSL.
// build.sbt
libraryDependencies += "org.scalameta" %% "munit" % "1.3.6" % Test
class PricingSuite extends munit.FunSuite {
  test("applies discount") {
    assertEquals(Pricing.apply(100, 10), 90)
  }

  test("rejects negative prices") {
    intercept[IllegalArgumentException](Pricing.apply(-1, 0))
  }
}

Resources:

Pricing

MUnit is free and open source under the Apache-2.0 licence.

  1. Scala teams wanting a simple, fast test library.
  2. Typelevel and Cats Effect users, via munit-cats-effect.

Conclusion

MUnit offers a refreshingly simple Scala testing experience with excellent error messages and broad platform support.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with MUnit side by side.