Skip to main content

MUnit

Add the Difflicious sbt plugin to project/plugins.sbt:

addSbtPlugin("com.github.jatcwang" % "sbt-difflicious" % "0.7.0-M2")

Then add the MUnit integration to build.sbt:

"com.github.jatcwang" %% "difflicious-munit" % "0.7.0-M2" % Test

and then extend MUnitDiffliciousSuite in your test suites and call assertNoDiff on any Differ.

import munit.FunSuite
import difflicious.munit.MUnitDiffliciousSuite
import difflicious.Differ

class MyTest extends FunSuite with MUnitDiffliciousSuite {
test("a == b") {
Differ[Int].assertNoDiff(1, 2)
}
}

MUnitDiffliciousSuite writes diff reports for failed diffs, which you can explore them using Diff Viewer UI / CLI.