Releases: scalameta/munit
v1.0.0-M7
Notable Changes
- Better messaging for reproducing failures in scalacheck #564
- Improved handling ignored tests in Gradle #601
- Fixed non-termination in scala-cli #606
All Changes
- Update mdoc, sbt-mdoc to 2.3.2 by @scalameta-bot in #547
- Update nscplugin, sbt-scala-native, ... to 0.4.5 by @scalameta-bot in #546
- Bump jsdom from 19.0.0 to 20.0.0 by @dependabot in #548
- Update google-cloud-storage to 2.9.0 by @scalameta-bot in #543
- Update sbt-scalajs, scalajs-compiler, ... to 1.10.1 by @scalameta-bot in #544
- scalafix 0.10.1 by @bjaglin in #560
- Update google-cloud-storage to 2.9.3 by @scalameta-bot in #558
- Use
def
to overridescalaCheckInitialSeed
by @armanbilge in #564 - Update mdoc, sbt-mdoc to 2.3.3 by @scalameta-bot in #567
- Update google-cloud-storage to 2.11.3 by @scalameta-bot in #568
- Update scalafmt-core to 3.5.9 by @scalameta-bot in #569
- Update sbt-scalafix to 0.10.2 by @scalameta-bot in #574
- Update google-cloud-storage to 2.12.0 by @scalameta-bot in #575
- Update scalacheck to 1.17.0 by @scalameta-bot in #577
- Update sbt-mima-plugin to 1.1.1 by @scalameta-bot in #578
- MUnitRunner: avoid invoking fireTestStarted if a test is skipped. by @rpalcolea in #601
- Update sbt to 1.8.0 by @scalameta-bot in #604
- Update mdoc, sbt-mdoc to 2.3.6 by @scalameta-bot in #588
- Update google-cloud-storage to 2.15.0 by @scalameta-bot in #602
- Update scalafmt-core to 3.6.1 by @scalameta-bot in #599
- Update sbt-scalafix to 0.10.4 by @scalameta-bot in #589
- Update scala-library, scala-reflect to 2.13.10 by @scalameta-bot in #590
- Update sbt-ci-release to 1.5.11 by @scalameta-bot in #591
- Bump jsdom from 20.0.0 to 20.0.2 by @dependabot in #596
- Update sbt-scalajs, scalajs-compiler, ... to 1.11.0 by @scalameta-bot in #576
- Update scala-library, scala-reflect to 2.12.17 by @scalameta-bot in #579
- Use daemon thread instead of non-daemon thread which prevent JVM from exiting by @lwronski in #606
- Update sbt-java-formatter to 0.8.0 by @scalameta-bot in #593
- Update sbt-scalafmt to 2.5.0 by @scalameta-bot in #607
New Contributors
- @bjaglin made their first contribution in #560
- @rpalcolea made their first contribution in #601
- @lwronski made their first contribution in #606
Full Changelog: v1.0.0-M6...v1.0.0-M7
v1.0.0-M6
What's Changed
- Expose rootCause util by @valencik in #542
- Update scala-library, scala-reflect to 2.12.16 by @scalameta-bot in #538
- Update mdoc, sbt-mdoc to 2.2.24 by @scalameta-bot in #534
- Update scalafmt-core to 3.5.8 by @scalameta-bot in #536
- Update sbt-java-formatter to 0.7.0 by @scalameta-bot in #533
- Update google-cloud-storage to 2.7.2 by @scalameta-bot in #532
- Update sbt-scalafmt to 2.4.6 by @scalameta-bot in #535
Full Changelog: v1.0.0-M5...v1.0.0-M6
v1.0.0-M5
What's Changed
- Format scala-3 MacroCompat with scala3 runner by @valencik in #518
- Update google-cloud-storage to 2.6.1 by @scala-steward in #522
- Update google-cloud-storage to 2.7.0 by @scala-steward in #526
- Update google-cloud-storage to 2.7.1 by @scala-steward in #527
- Add support for JSDOM to JSIO by @armanbilge in #529
Full Changelog: v1.0.0-M4...v1.0.0-M5
v1.0.0-M4
What's Changed
- Update Mill build script in
getting-started.md
by @lolgab in #504 - feat: better "obtained empty" help message by @kpodsiad in #502
- Update sbt-mima-plugin to 1.1.0 by @scala-steward in #509
- Update sbt to 1.5.8 by @scala-steward in #471
- Update sbt-scalafix to 0.9.34 by @scala-steward in #479
- Bump actions/checkout from 2 to 3 by @dependabot in #505
- Update sbt-buildinfo to 0.11.0 by @scala-steward in #495
- Update google-cloud-storage to 2.1.10 by @scala-steward in #496
- Update sbt to 1.6.2 by @scala-steward in #512
- Update google-cloud-storage to 2.6.0 by @scala-steward in #514
- Update auxlib, javalib, nativelib, nscplugin, ... to 0.4.4 by @scala-steward in #498
- Update sbt-scala-native-crossproject, ... to 1.2.0 by @scala-steward in #503
- Move JDK shims to
munit.internal
by @armanbilge in #441 - Cross publish native by @kpodsiad in #477
- Update Scala213 to 2.13.8 by @valencik in #515
- Update scalajs to 1.10.0 by @valencik in #516
- Update scalafmt to 3.5.1 by @valencik in #517
- Add docstrings for several assertion methods by @valencik in #519
- Revive "Strict Equality" for
assertEquals()
by @valencik in #521 - Update scala3-library, ... to 3.1.2 by @scala-steward in #520
Full Changelog: v1.0.0-M3...v1.0.0-M4
v1.0.0-M3
v1.0.0-M2
What's Changed
- Respect
munitTimeout
for non-Future tests by @olafurpg in #435 - Add reproduction for #285 by @olafurpg in #436
- Remove Scala.js-specific instructions by @armanbilge in #438
- Enable google-java-format for Java files by @olafurpg in #439
- Remove
-XX:+CMSClassUnloadingEnabled
from .jvmopts by @armanbilge in #440 - Update website to point to latest stable release by @olafurpg in #443
- Fix
unitToProp
implicit conversion by @armanbilge in #449 - Fix 2 typos in flaky tests section by @sosna in #450
- Fix documents by @keyno63 in #460
- Typo in method description by @artemkorsakov in #483
- Make flaky tag work with Scalacheck suites by @olafurpg in #478
- Fix #497 - don't load fixtures for empty test suites by @olafurpg in #499
New Contributors
- @sosna made their first contribution in #450
- @keyno63 made their first contribution in #460
- @artemkorsakov made their first contribution in #483
Full Changelog: v1.0.0-M1...v1.0.0-M2
MUnit v1.0.0-M1
First milestone towards MUnit v1.0
This is the first milestone towards releasing MUnit v1.0. The goal of MUnit v1.0 is to fix a few long-standing quirks of the MUnit API that require breaking changes. Check out https://github.com/scalameta/munit/milestone/1 for an overview on what issues are blocking a stable v1.0.0 release (non-milestone).
Fixtures can now be implemented as a toplevel class
Previously, it was only possible to implement Fixture[T]
with inner classes inside FunSuite
. Now, it's possible to implement fixtures with toplevel classes outside of FunSuite
.
Fixture lifecycle methods can now return Future[Unit]
Previously, Fixture[T]
only support synchronous lifecycle methods (beforeAll
, beforeEach
, afterEach
and afterAll
). On the JVM it was possible to use blocking I/O to work around this limitation if you had async fixtures but that was not possible in Scala.js. Now, there is a new munit.FutureFixture[T]
, which supports returning Future[Unit]
from the lifecycle methods. It's also possible to implement fixtures with a custom effect type (like Cats Resource
), see https://scalameta.org/munit/docs/fixtures.html#asynchronous-fixtures-with-custom-effect-type.
⚠️ Breaking changes
This release contains binary breaking changes that require 3rdparty integrations (cats-effect, testcontainers) to recompile their source code. We tried to preserve source compatibility as much as possible by using type aliases.
munit.GenericTest[T]
has been replaced withmunit.Test
. There is a deprecatedmunit.GenericTest
type alias in the package object to preserve source compatibility.munit.GenericBeforeEach[T]
has been replaced withmunit.BeforeEach
. There is a deprecatedmunit.GenericBeforeEach
type alias in the package object to preserve source compatibility.munit.GenericAfterEach[T]
has been replaced withmunit.AfterEach
. There is a deprecatedmunit.GenericAfterEach
type alias in the package object to preserve source compatibility.munit.FunSuite.Fixture
is no longer an inner class, it's now a toplevelmunit.Fixture
class. There is amunit.FunSuite.Fixture
type alias for source compatibility. This alias is not deprecated since it's convenient to not have to explicitlyimport munit.Fixture
inside the body of aFunSuite
class.munit.FunSuite
is now an empty abstract class that extends a new traitmunit.BaseFunSuite
, which includes all the- The method
munit.Test.withBodyMap()
no longer has a type parameter. It's OK to just remove the type parameter, it's no longer used. - The
FunSuite.{afterEach,afterAll}
methods are now evaluated before custom fixtures instead of after custom fixtures. The ordering forbeforeAll
andbeforeEach
is unchanged. The diff below demonstrates an example, assuming you have a fixture namedmyFixture
and a test suite namedMySuite
. In other words,FunSuite.{before*,after*}
methods are now evaluated as a regularFixture[T]
that's always the first element ofmunitFixtures: Seq[Fixture[_]]
.
-- old order
++ new order
MySuite.beforeAll()
myFixture.beforeAll()
MySuite.beforeEach(test-1)
myFixture.beforeEach(test-1)
+ MySuite.afterEach(test-1)
myFixture.afterEach(test-1)
- MySuite.afterEach(test-1)
+ MySuite.afterAll()
myFixture.afterAll()
- MySuite.afterAll()
⚠️ Expect a few more milestone releases with a few more binary breaking changes
We're planning a few minor breaking changes before releasing a stable v1.0.0. Please keep this in mind if you're the maintainer of a 3rdparty integration. We will try to not stay in this milestone for too long.
Merged pull requests
- Bump olafurpg/setup-scala from 12 to 13 by @dependabot in #410
- Use provided
scalaJSVersion
andnativeVersion
by @lolgab in #413 - Update scala-library, scala-reflect to 2.12.15 by @scala-steward in #415
- Update sbt-scalafix to 0.9.31 by @scala-steward in #416
- Update sbt-ci-release to 1.5.9 by @scala-steward in #419
- Update mdoc, sbt-mdoc to 2.2.23 by @scala-steward in #406
- Update sbt-mima-plugin to 1.0.0 by @scala-steward in #405
- Update google-cloud-storage to 1.118.1 by @scala-steward in #398
- Update google-cloud-storage to 2.1.5 by @scala-steward in #421
- More correct string inequality error message by @raboof in #427
- Update sbt-ci-release to 1.5.10 by @scala-steward in #432
- Update sbt-mima-plugin to 1.0.1 by @scala-steward in #428
- Update google-cloud-storage to 2.1.7 by @scala-steward in #426
- Add support for async fixtures by @olafurpg in #430
- Introduce
BaseFunSuite
trait and makeFunSuite
an empty class by @olafurpg in #433
New Contributors
Full Changelog: v0.7.29...v1.0.0-M1
MUnit v0.7.29
Fix regression that caused console test reports to get lost
The previous release v0.7.28 introduced a regression where console test reports would occasionally get lost, see #408. This regression should be fixed in this release.
Pull Requests
MUnit v0.7.28
Buffered logging
Thanks to a contribution from @jenshalm, MUnit now uses buffered logging by default to ensure that the standard output is grouped by test suites when running tests in parallel (which is enabled by default in sbt). To disable buffered logging (old behavior), add the following to build.sbt
Test / testOptions += Tests.Argument(TestFrameworks.MUnit, "-b")
Pull Requests
- Turn on buffered logging by default (#400) @jenshalm
- Add buffered logging option (#397) @jenshalm
- Improve error message when comparing arrays with same elements (#395) @olafurpg
Updates
- Update mdoc, sbt-mdoc to 2.2.22 (#394) @scala-steward
- Update sbt to 1.5.5 (#391) @scala-steward
- Update scala3-library, ... to 3.0.1 (#390) @scala-steward
- Update sbt-scalafmt to 2.4.3 (#389) @scala-steward
- Update sbt-scala-native-crossproject, ... to 1.1.0 (#387) @scala-steward
MUnit v0.7.27
Pull Requests
- Remove Node.js requirement with Scala.js (#376) @olafurpg
- Bump olafurpg/setup-scala from 11 to 12 (#386) @dependabot
- Update sbt to 1.5.4 (#380) @scala-steward
- Update scalajs-junit-test-runtime, ... to 1.6.0 (#379) @scala-steward
- Update sbt-scalajs, ... to 1.6.0 (#377) @scala-steward
- Update google-cloud-storage to 1.115.0 (#375) @scala-steward
- Update sbt to 1.5.3 (#374) @scala-steward
- Bump olafurpg/setup-scala from 10 to 11 (#373) @dependabot
- Update sbt-scalafix to 0.9.29 (#372) @scala-steward
- Update scala-library, scala-reflect to 2.12.14 (#370) @scala-steward
- Update sbt-mima-plugin to 0.9.2 (#369) @scala-steward
- Update sbt-scalafix to 0.9.28 (#368) @scala-steward
- Create LICENSE (#367) @gabro
- Update scala-library, scala-reflect to 2.13.6 (#366) @scala-steward
- Update mdoc, sbt-mdoc to 2.2.21 (#364) @scala-steward
- Update google-cloud-storage to 1.114.0 (#363) @scala-steward
- Update sbt-mima-plugin to 0.9.1 (#362) @scala-steward
- Drop Scala 3.0.0-RC3 (#361) @gabro