Skip to main content

Weaver

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

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

Then add the Weaver integration to build.sbt:

"com.github.jatcwang" %% "difflicious-weaver" % "0.7.1" % Test

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

import cats.effect.IO
import weaver.SimpleIOSuite
import difflicious.weaver.WeaverDiffliciousSuite
import difflicious.Differ

object MyTest extends SimpleIOSuite with WeaverDiffliciousSuite[IO] {
pureTest("a == b") {
Differ[Int].assertNoDiff(1, 2)
}
}

On the JVM, WeaverDiffliciousSuite writes reports for failed diffs, which you can explore using Diff Viewer UI / CLI. JSONL report writing is not currently supported on Scala.js or Scala Native.