startest

Functions

pub fn describe(name: String, suite: List(TestTree)) -> TestTree

Defines a new test suite with the given name.

A suite is a way of grouping related tests together.

describes may also be nested in other describes to form a hierarchy of tests.

pub fn it(name: String, body: fn() -> Nil) -> TestTree

Defines a test with the given name.

pub fn run_tests(
  tests: List(TestTree),
  reporters: List(Reporter),
) -> Nil

Runs the given tests and reports results using the provided list of Reporters.

pub fn xit(name: String, body: fn() -> Nil) -> TestTree

Skips a test defined using it.

This can be used to skip running certain tests, but without deleting the code. For instance, you might want to do this if a test is flaky and you want to stop running it temporarily until it can be fixed.

Search Document