Skip to content

Migrate test library and suite from MUnit to Weaver#316

Open
Hombre-x wants to merge 19 commits intotypelevel:mainfrom
Hombre-x:weaver-migration
Open

Migrate test library and suite from MUnit to Weaver#316
Hombre-x wants to merge 19 commits intotypelevel:mainfrom
Hombre-x:weaver-migration

Conversation

@Hombre-x
Copy link
Copy Markdown

@Hombre-x Hombre-x commented Apr 15, 2026

Adresses #314

This PR updates the Typelevel Toolkit by replacing MUnit with Weaver as the default test framework and refactoring the test infrastructure to use Weaver for all test suites.

Also, updated both the site and README to reference Weaver instead of MUnit.

Lastly, because weaver depends on Scala 2.13.18, It has to match the Scala 2 version. However, older versions of sbt-typelevel and sbt-scalajs don't have the kind projector artifact published for 2.13.18, so both plugins also needed to be upgraded to versions sbt-typelevel 0.8.5 (which required sbt to be upgraded to 1.12.9) and sbt-scalajs 1.20.1 (which required scala-cli to be upgraded to 1.12.5).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the toolkit’s testing setup from MUnit to Weaver, updating the test suites and documentation accordingly, and adjusting the test-runner helpers to return Weaver Expectations instead of throwing MUnit assertion failures.

Changes:

  • Migrated ToolkitCompilationTest from CatsEffectSuite (MUnit) to SimpleIOSuite (Weaver) and introduced an explicit timeout wrapper for long-running scala-cli tests.
  • Refactored ScalaCliProcess helpers to return IO[Expectations] (using success/failure) instead of IO[Unit] + MUnit fail.
  • Updated docs/README references and links from MUnit to Weaver.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/shared/src/test/scala/org/typelevel/toolkit/ToolkitCompilationTest.scala Ported the compilation test suite to Weaver and added timeout handling.
tests/shared/src/test/scala/org/typelevel/toolkit/ScalaCliProcess.scala Updated scala-cli process helpers to produce Weaver expectations and improved failure reporting.
docs/index.md Replaced MUnit references/links with Weaver.
build.sbt Swapped test dependencies from MUnit to Weaver and updated docs site nav link.
README.md Updated docs references to Weaver and tweaked snippet formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/shared/src/test/scala/org/typelevel/toolkit/ScalaCliProcess.scala Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants