MUnit

MUnit

  • Docs
  • Blog
  • GitHub

›Overview

Overview

  • Getting started
  • Declaring tests
  • Writing assertions
  • Using fixtures
  • Filtering tests
  • Generating test reports
  • Coming from ScalaTest
  • Troubleshooting

Integrations

  • ScalaCheck
Edit

Coming from ScalaTest

If you only use basic ScalaTest features, you should be able to replace usage of org.scalatest.FunSuite with minimal changes like below.

- import org.scalatest.munit.AnyFunSuite
- import org.scalatest.FunSuite
+ import munit.FunSuite

- class MySuite extends FunSuite with BeforeAll with AfterAll {
+ class MySuite extends FunSuite {
  test("name") {
    // unchanged
  }

- ignore("ignored") {
+ test("ignored".ignore) {
    // unchanged
  }

Optionally, replace usage of assert(a == b) with assertEquals(a, b) to improve the error message in failed assertions:

- assert(a == b)
+ assertEquals(a, b)
← Generating test reports Troubleshooting →
MUnit
Overview
Getting started
Social
Copyright © 2020 Scalameta