Skip to content
CAI
Software that uses CAICheck a score

scalameta/munit

60.2

Adequate · 6 November 2026

6.4k

lines of production code

Scala

with Java

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add ANSI color support and string printing utilities for diff output

New files in the console package introduce ANSI color handling and string formatting capabilities for diff results. AnsiColors defines color codes and a noColor flag (via the NO\_COLOR environment variable) to control whether ANSI markers are applied, along with a filterAnsi method to strip them. Printers provides functions to format strings for display, including escaping special characters and handling multiline strings, while ensuring ANSI codes are filtered out in the final print output.

munit-diff/shared/src/main/scala/munit/diff/console · high confidence

Add JS-specific internal IO implementation

Introduces a new \munit.internal.io\ package for the Scala.js target, providing platform-specific implementations of file and path operations (\File\, \Files\, \Paths\, \PlatformIO\) that delegate to Node.js APIs or JSDOM where available, enabling file system interactions within the JS test environment.

munit/js/src/main/scala/munit/internal/io · high confidence

Add JUnit interface implementation for Scala.js

New files \JUnitTask.scala\ and \MUnitRunNotifier.scala\ have been added to \munit/js/src/main/scala/munit/internal/junitinterface\, providing the core runtime components for running MUnit tests via the JUnit task interface on Scala.js. \JUnitTask\ handles task execution by instantiating runners and managing asynchronous execution, while \MUnitRunNotifier\ bridges JUnit notification events to MUnit's reporting system, ensuring test lifecycle events (start, finish, failure, ignored) are correctly translated and reported.

munit/js/src/main/scala/munit/internal/junitinterface · high confidence

Add JUnit interface support for Scala Native

Introduces new \JUnitTask\ and \MUnitRunNotifier\ implementations in the \munit/native\ module, enabling MUnit tests to be executed via the JUnit interface on Scala Native platforms. The \MUnitRunNotifier\ uses concurrent data structures to track test status and report results (started, finished, ignored, failed, assumption violations) to the reporter, while \JUnitTask\ handles runner instantiation and error reporting, ensuring consistent behavior with the JVM implementation.

munit/native/src/main/scala/munit/internal/junitinterface · high confidence

Add JUnit interface support for Scala.js and Scala Native

Munit now provides a JUnit-compatible test interface for Scala.js and Scala Native, enabling these platforms to integrate with build tools and IDEs that rely on the sbt.testing and JUnit runner protocols. This change introduces a \Framework\ implementation and a suite of internal classes (including \JUnitRunner\, \JUnitReporter\, and \JUnitEvent\) that translate Munit test execution into standard JUnit events. Users can now run Munit tests on JS/Native via standard JUnit-compatible tooling, with support for features like tag-based filtering, colored console output, and SBT logger integration.

munit/js-native · high confidence

Add MUnit homepage with feature showcase

The website now includes a dedicated landing page for MUnit that highlights its core capabilities, including source locations for errors, helpful diffs for assertion failures, highlighted stack traces, and IDE support for tools like IntelliJ and VS Code.

website/pages · high confidence

Add PlatformIO abstraction for JVM and Native

Introduced a new \PlatformIO\ abstraction in the \munit.internal.io\ package for both JVM and Native platforms. This change provides a unified interface for file system operations (such as reading lines and checking existence) and path handling, allowing the testing framework to support Scala Native alongside the existing JVM implementation.

munit/jvm/src/main/scala/munit/internal/io, munit/native/src/main/scala/munit/internal/io · high confidence

Add SBT plugin for uploading and storing MUnit test reports

The munit-sbt module now includes a new SBT plugin that automatically generates structured test reports and uploads them to a Google Cloud Storage bucket (defaulting to 'munit-test-reports') or saves them locally. This feature integrates with CI environments by reading repository, branch, and commit metadata from GitHub Actions environment variables, allowing users to persist and access detailed test execution summaries directly from their cloud storage or local filesystem.

munit-sbt · high confidence

Add Scala 2 macro implementations for Clue and Location generation

Introduced a new \MacroCompat\ object in the shared Scala 2 source directory that provides macro-based implementations for generating \Location\ and \Clue\[T\]\ instances, as well as capturing compile-time errors. This change enables the framework to automatically capture source location and expression details for assertions and clues on Scala 2, mirroring functionality previously available or handled differently in other Scala versions.

munit/shared/src/main/scala-2 · high confidence

Add Scala Native support via PlatformCompat

This change introduces the initial support for running MUnit tests on Scala Native. It adds a new \PlatformCompat\ implementation in \munit/native/src/main/scala/munit/internal\ that handles platform-specific behaviors such as asynchronous execution, timeouts, and test runner instantiation using Scala Native's reflection capabilities. Additionally, it includes a shim for the \java.lang.annotation.Annotation\ trait to satisfy runtime requirements.

munit/native/src/main/scala/munit/internal · high confidence

Add Scala.js support via platform-specific internal components

This change introduces the necessary internal infrastructure to support running MUnit tests on Scala.js. It adds \PlatformCompat.scala\ which provides a JavaScript-specific execution context, implements non-blocking asynchronous test execution using \setTimeout\ for timeouts (since blocking is not possible in the browser), and handles suite instantiation via reflection. Additionally, it includes \InvocationTargetException\ and \UndeclaredThrowableException\ classes to handle exception wrapping in a way compatible with Scala.js, ensuring that test failures and async errors are reported correctly on this platform.

munit/js/src/main/scala/munit/internal · high confidence

Added scripts for Scala Native setup and release validation

The repository now includes \bin/native\_setup.sh\ to automate the installation of system dependencies required for Scala Native development on macOS (via Homebrew) and Linux (via apt-get), and \bin/test-release.sh\ to validate new releases by resolving artifacts across multiple Scala versions (2.12, 2.13, 3.0.0) and platforms (JVM, Native, Scala.js) using Coursier.

bin · high confidence

Initial MUnit documentation website setup

The MUnit documentation site has been established using Docusaurus, providing a structured hub for user guides. The initial release includes a sidebar navigation organizing content into Overview (covering getting started, tests, assertions, fixtures, filtering, ScalaTest compatibility, and troubleshooting) and Integrations (featuring ScalaCheck and external integrations). The site configuration enables Algolia search, Google Analytics tracking, and a blog section, while custom styling and syntax highlighting are applied to the documentation pages.

website · high confidence

JVM test framework integration via JUnit interface

MUnit now provides a JVM-specific Framework implementation that integrates with build tools via the sbt.testing interface. This change introduces a custom fingerprint for MUnit suites and registers a custom runner, allowing JVM-based test runners to discover and execute MUnit tests seamlessly.

munit/jvm/src/main/scala/munit · high confidence

MUnit 1.0 initial release with JUnit interface integration and cross-platform support

This release introduces MUnit 1.0, featuring a new internal JUnit interface implementation (moved from the junit-interface project) that enables running JUnit 4 tests alongside MUnit suites. The framework now supports Scala.js and Scala Native via dedicated source folders and a custom path implementation, while adding new test tags such as Pending, Ignore, Only, Flaky, and Slow. Users benefit from improved logging control via the --log flag, buffered logging options, and better stack trace handling.

repository · high confidence

MUnit core framework restructured with new assertion and fixture APIs

The MUnit testing library has been restructured to provide a more robust and configurable testing experience. Key changes include the introduction of \Clue\ and \Clues\ classes to attach descriptive context to assertion failures, and a new \Compare\ type-class that allows for customizable value comparisons and error messages. The framework now supports async fixtures via \FutureFixture\ and synchronous fixtures via \Fixture\, with lifecycle methods (\beforeAll\, \afterAll\, \beforeEach\, \afterEach\) properly integrated into the \Suite\ and \MUnitRunner\. Additionally, \assertMatches\ has been added for partial function assertions, and \EventuallyOptions\ enables configurable retry logic for flaky tests. The \FailException\ now extends \AssertionError\ for better compatibility with IDEs, and \ComparisonFailException\ is used for detailed diff output in comparison failures.

munit/shared/src/main/scala/munit · high confidence

Removals

Removal of legacy MUnit core implementation files

The \munit\ module has removed its core implementation files, including \Arguments\, \BeforeAll\, \Formatter\, \Runner\, \Suite\, \Tag\, \Test\, and internal utilities like \Colors\ and \StackMarker\. This change strips out the foundational classes and logic that previously handled test execution, formatting, and lifecycle management, indicating a significant structural shift or removal of the original MUnit framework implementation in this location.

munit · high confidence

Behavioural changes

1 commit (0 fixes) modifying munit-docs, website/static

A change to existing behaviour in munit-docs, website/static — 1 commit, 5 files: “Setup Docusaurus site with mdoc”.

munit-docs, website/static · medium confidence · unverified

Add Scala 2.13 compatibility layer for internal utilities

The framework now supports Scala 2.13 by introducing version-specific compatibility shims in the \munit.internal.Compat\ object. For Scala 2.13, the library uses native \productElementNames\ and \collectionClassName\ methods, while pre-2.13 versions fall back to \Iterator.continually("")\ and \stringPrefix\ respectively, ensuring consistent internal behavior across Scala versions.

munit/shared/src/main/scala-2.13, munit/shared/src/main/scala-pre-2.13 · high confidence

Add Scala Native compatibility for JUnit assumption and comparison exceptions

The Scala Native module now includes implementations of JUnit's \AssumptionViolatedException\ and \ComparisonFailure\ classes. This addition allows tests relying on these specific JUnit exception types to compile and run correctly on the Scala Native platform, resolving previous compilation errors and ensuring proper handling of assumption violations and comparison failures.

munit/native/src/main/scala/org · high confidence

Improved test failure output with context lines, clue printing, and stack trace trimming

When a test fails, the console output now includes the surrounding source code lines (the failing line plus one line before and after) to provide immediate context. Additionally, any registered clues are now pretty-printed alongside the failure message, and stack traces are automatically trimmed to remove internal Munit boilerplate, resulting in cleaner, more readable error reports.

munit/shared/src/main/scala/munit/internal/console · high confidence

Introduce configurable diff reporting with ANSI and custom printers

The diff reporting logic in munit-diff now supports configurable options via DiffOptions, allowing users to control ANSI color usage, context size, and line display. A new optional value printer can be provided to customize how values are formatted in diff output, and the deprecated Diffs object is marked for removal in favor of the new Diff class.

munit-diff/shared/src/main/scala/munit/diff · high confidence

JVM-specific timeout and async execution implementation

The JVM platform now uses a dedicated \PlatformCompat\ implementation that introduces a daemon thread scheduler to enforce test timeouts via \TimeoutException\ and supports truly asynchronous test execution through \ExecutionContext.global\. This change ensures that the \munitTimeout\ setting is respected for non-Future tests and prevents the JVM from hanging on exit by using daemon threads for internal scheduling.

munit/jvm/src/main/scala/munit/internal · high confidence

Restored binary compatibility and improved macro reliability

The library restores backward compatibility with munit-scalacheck by re-introducing the deprecated FutureCompat object, which provides extension methods for Future operations. Additionally, the Location macro implementation has been updated to be hermetic by resolving file paths relative to the current working directory, ensuring consistent test reporting regardless of the execution context.

munit/shared/src/main/scala/munit/internal · high confidence

Scala 3 compatibility layer for location and compile-time error reporting

Added Scala 3-specific compatibility implementations for core testing features. The new \Compat.scala\ provides access to \productElementNames\ and \collectionClassName\ required by Scala 3 APIs. The \MacroCompat.scala\ file introduces Scala 3 macro implementations for \Location\ generation (using \Position.ofMacroExpansion\ for accurate file/line info) and \Clue\ generation. Crucially, it adds a \transparent inline\ \compileErrors\ macro that leverages \scala.compiletime.testing.typeCheckErrors\ to capture compilation errors, ensuring that test assertions for compile-time failures are independent of terminal settings and reproducible.

munit/shared/src/main/scala-3 · high confidence

Upgrade scalafmt to v3.11.5 and reconfigure formatting rules

The project's code formatter has been upgraded from scalafmt v2.3.2 to v3.11.5, introducing significant changes to how source code is formatted. Users will see updates to import handling (selectors are now folded), the removal of semicolons, and specific rules for floating-point literals and docstrings. This change also updates the default dialect to scala212 and excludes specific files like LinesSuite.scala from formatting checks.

(repo-wide) · high confidence

The website footer component has been updated to direct users to the project's Discord community rather than Gitter. This change is visible in the new Footer.js file, which includes a link to the Discord server alongside GitHub and Twitter social badges.

website/core · high confidence

junit-interface moved to MUnit and refactored for buffered logging and pending test support

The junit-interface library has been moved into the MUnit codebase and significantly refactored. The package namespace has changed from com.novocode to munit.internal.junitinterface. Key behavioral changes include the introduction of buffered logging (enabled by default via +b flag) to improve log output coherence, support for the NO\_COLOR environment variable to disable ANSI colors, and new PendingTag and PendingCommentTag interfaces to handle pending test cases. The EventDispatcher now logs suite-started and suite-finished events, and the JUnitRunner parses arguments using a switch statement for better maintainability. The PantsFramework now supports ScalaTest 3.1+ by recognizing the moved JUnitRunner package.

junit-interface · high confidence

Test coverage

Added @IgnoreSuite annotation for JVM tests; Added JVM-specific test suites for async fixtures, timeouts, and test selectors; Added JavaScript-specific test suites for async, timeout, and reflective instantiation; Added comprehensive framework integration tests; Added comprehensive test suites for MUnit core features; Added tests for Scala Native reflective instantiation and await behavior; Added tests for issue \#1002 and CPU throttling utility.

Dependencies

Add website dependencies and update build configuration

The project now includes a website module with Docusaurus 1.14.3 for documentation, alongside root-level dependencies on jsdom ^30.1.1 for testing. The build configuration has been significantly expanded to support Scala 2.12, 2.13, and 3.x across JVM, JS, and Native platforms, integrating sbt-dynver for dynamic versioning, MiMa for binary compatibility checks, and Google Cloud Storage 2.71.0 for test report uploads.

(dependencies) · high confidence

Upgrade to sbt 2.0 and update build tooling

The build system has been upgraded from sbt 1.3.6 to sbt 2.0.6, requiring a corresponding update to the \sbt-ci-release\ plugin to version 1.12.0. Several other build dependencies have been updated to their latest versions, including \sbt-buildinfo\ (0.13.1), \sbt-mdoc\ (2.9.1), \sbt-scalafmt\ (2.6.2), \sbt-scalafix\ (0.14.7), \sbt-scalajs\ (1.22.0), \sbt-scala-native\ (0.5.12), \sbt-mima-plugin\ (1.2.0), and \sbt-java-formatter\ (0.13.1). Additionally, the \google-cloud-storage\ library used in the build has been updated to version 2.71.0.

project · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 53 → 60 (+7.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 64 → 64 (+0.0)
  • Architecture 92 → 90 (-1.2)
  • Maturity 30 → 50 (+20.2)
  • Readiness 80 → 79 (-0.6)
  • Security 74 → 63 (-11.3)
  • Performance 100 → 100 (+0.0)

Resolved (8)

  • Documentation: contradicts the code (docs/reports.md)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Inconsistent Plugin Lifecycle Method Naming: MUnitPlugin exposes a trigger() method, while MUnitReportPlugin exposes a requires() method. In SBT plugin development, 'requires' typically denotes dependencies on other plugins, while 'trigger' might imply an action. However, having different method names for what might be similar plugin configuration or activation points across different plugin types is confusing. If these are standard SBT plugin methods, they should follow SBT conventions consistently (e.g., both using requires() for dependencies or both using trigger() if they are custom activation hooks).
  • Inconsistent Setting Types in Plugin Properties: MUnitPlugin uses List[Setting[_ <: Option[Object]]] for globalSettings and Seq[Setting[]] for projectSettings. MUnitReportPlugin uses List[Setting[ <: Seq[Object]]] for projectSettings. The variance and container types (List vs Seq, Option[Object] vs Seq[Object]) are inconsistent across plugins, which may indicate different underlying SBT version requirements or design choices, but it creates an inconsistent API surface for plugin authors expecting uniformity.
  • Off-boarding risk: anonymized user #1
  • Outdated: com.google.cloud:google-cloud-storage
  • Outdated: org.scalameta:munit-scalacheck_2.13
  • Redundant Listener Types with Identical Signatures: MUnitGcpListener, MUnitLocalListener, and MUnitReportListener all expose an identical method signature onReport(report: Summary). This suggests that MUnitReportListener is likely an interface or base type intended to be implemented by the specific listeners, but the specific listeners are exposed as distinct top-level types with duplicate method signatures rather than just implementing the interface. This creates confusion about whether the user should instantiate the specific listeners or the generic listener type.

New (2)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 5 commits — 5 feature/other, 0 fixes

By area

  • (root) — 2 commits
  • .github/workflows — 1 commit
  • tests/jvm — 1 commit
  • website/yarn.lock — 1 commit

Notable commits

  • change: Bump actions/setup-java from 6.0.1 to 6.1.0 (#1183)
  • change: Bump jsdom from 30.1.1 to 30.1.3 (#1184)
  • change: Bump proxy-addr in /website in the npm_and_yarn group across 1 directory (#1186)
  • change: Bump source-map-js (#1185)
  • change: Run TimeoutSuite infinite loop on its own thread (#1187)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scalameta/munit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 12ba88bd9779f8ab45555eae6ed980dc6a0bc7c6 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.