A lightweight testing framework for Scala and Scala.js with cross-compilation support.
Minitest is a lightweight testing framework specifically designed for Scala and Scala.js, providing a minimalistic yet powerful toolset for writing unit and property-based tests. It solves the need for a simple, cross-platform testing solution that avoids the complexity of larger frameworks while supporting modern Scala features and asynchronous testing.
Scala developers working on JVM or Scala.js projects who prefer a straightforward, no-frills testing framework with essential features and cross-compilation support.
Developers choose Minitest for its simplicity, cross-platform compatibility, and seamless integration with ScalaCheck, offering a focused alternative to heavier testing frameworks without sacrificing functionality.
The super light testing library for Scala and Scala.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Minitest is cross-compiled for Scala 2.12, 2.13, 3.0, and Scala.js 1.x, enabling consistent unit testing across JVM and JavaScript environments, as highlighted in the key features.
Test suites are defined as objects inheriting from SimpleTestSuite or TestSuite, offering a minimal and clear API that reduces boilerplate, demonstrated in the tutorial examples.
Provides testAsync for writing tests that return Future[Unit], seamlessly accommodating asynchronous code patterns, as shown in the asynchronous execution example.
Integrates with ScalaCheck via minitest-laws packages, allowing property-based testing with methods like check2 and check3, detailed in the laws test section.
The minitest-laws package is not available for Scala Native due to ScalaCheck's lack of support, restricting property-based testing in Native environments, as admitted in the README.
Updates for ScalaCheck have been problematic, forcing separate legacy packages (e.g., minitest-laws-legacy for ScalaCheck 1.13.5), which complicates dependency management and versioning.
While promoting simplicity, it lacks advanced features like BDD-style specifications, mocking frameworks, or extensive reporting tools that are standard in larger frameworks like ScalaTest.