Migrate test library and suite from MUnit to Weaver#316
Open
Hombre-x wants to merge 14 commits intotypelevel:mainfrom
Open
Migrate test library and suite from MUnit to Weaver#316Hombre-x wants to merge 14 commits intotypelevel:mainfrom
Hombre-x wants to merge 14 commits intotypelevel:mainfrom
Conversation
It now replaces MUnit with Weaver
There was a problem hiding this comment.
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
ToolkitCompilationTestfromCatsEffectSuite(MUnit) toSimpleIOSuite(Weaver) and introduced an explicit timeout wrapper for long-running scala-cli tests. - Refactored
ScalaCliProcesshelpers to returnIO[Expectations](usingsuccess/failure) instead ofIO[Unit]+ MUnitfail. - 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.
tests/shared/src/test/scala/org/typelevel/toolkit/ToolkitCompilationTest.scala
Show resolved
Hide resolved
To solve the kind projector dependency issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, I 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).