Skip to main content

Mojo package

testing

Unit testing: Assertions (equal, true, raises) and test suites.

The testing package provides a unit testing framework for Mojo code. It includes assertion functions for validating conditions and values, plus infrastructure for organizing and running test suites. The framework follows familiar patterns from other testing libraries, making it straightforward to write and maintain tests.

Use this package to write unit tests for your Mojo code, validate correctness, and catch regressions during development.

Packages

  • prop: A property testing package.

Modules

  • suite: Implements test suite infrastructure for organizing and running tests.
  • testing: Implements various testing utils.

Was this page helpful?