MUnit

MUnit

  • Docs
  • Blog
  • GitHub

›All Blog Posts

All Blog Posts

  • Using ScalaCheck with MUnit
  • Cross-platform async testing support
  • MUnit is a new Scala testing library

Using ScalaCheck with MUnit

March 24, 2020

Gabriele Petronella

Gabriele Petronella

Property-based testing is a popular testing style and its most widely used implementation for Scala is the ScalaCheck library.

Starting with version 0.7.0, MUnit introduces a dedicated integration for ScalaCheck, which we'll explore in this blog post.

Read More

Cross-platform async testing support

February 16, 2020

Ólafur Páll Geirsson

Ólafur Páll Geirsson

MUnit v0.4.x did not support truly async tests on platforms like JavaScript. For example, the following test case would succeed even if it returns a failing future:

test("should fail after 100 milliseconds") {
  val p = Promise[Unit]()
  setTimeout(100) {
    p.failure(new RuntimeException("boom"))
  }
  p.future
}

The latest MUnit v0.5.0 release fixes this issue by adding support for async tests on all platforms meaning that the example test case above fails as expected after 100 milliseconds.

Read More

MUnit is a new Scala testing library

February 1, 2020

Ólafur Páll Geirsson

Ólafur Páll Geirsson

Hello world! I'm excited to announce the first release of MUnit, a new Scala testing library with a focus on actionable errors and extensible APIs. You may be thinking "Why create Yet Another Scala testing library?". It's a good question and this post is my attempt to explain the motivations for creating MUnit.

Read More
MUnit
Overview
Getting started
Social
Copyright © 2020 Scalameta