startest

Values

pub fn default_config() -> config.Config

Returns the default Startest config.

pub fn describe(
  name: String,
  suite: List(test_tree.TestTree),
) -> test_tree.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) -> test_tree.TestTree

Defines a test with the given name.

pub fn run(config: config.Config) -> Nil

Runs Startest with the provided list of tests.

pub fn xit(name: String, body: fn() -> Nil) -> test_tree.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