startest/test_case

Types

A Test that has been executed and has a TestOutcome.

pub type ExecutedTest {
  ExecutedTest(test_case: Test, outcome: TestOutcome)
}

Constructors

  • ExecutedTest(test_case: Test, outcome: TestOutcome)

A test case.

pub type Test {
  Test(name: String, body: TestBody, skipped: Bool)
}

Constructors

  • Test(name: String, body: TestBody, skipped: Bool)
pub type TestBody =
  fn() -> Nil

The outcome of a Test that has been run.

pub type TestOutcome {
  Passed
  Failed(TestFailure)
  Skipped
}

Constructors

  • Passed
  • Failed(TestFailure)
  • Skipped

Functions

pub fn decode_test(
  value: Dynamic,
) -> Result(Test, List(DecodeError))
Search Document