gleamunison/cli_test

Run in-language tests and persist evidence before reporting success.

Types

Attachments produced by a run: subject hash + human payload, in order.

pub type Attachments =
  List(#(String, String))

Values

pub fn command(args: List(String)) -> Nil
pub fn has_failures(
  results: List(test_runner.TestResult),
) -> Bool

No tests or no assertions is not a successful test run.

pub fn run_file(
  path: String,
  adapter: storage.StorageAdapter,
) -> Result(
  #(List(test_runner.TestResult), List(#(String, String))),
  String,
)

The caller owns the supplied adapter. Failed insertions are errors, not missing attachments silently discarded from a successful report.

pub fn run_file_with_signer(
  path: String,
  adapter: storage.StorageAdapter,
  signer: evidence.Signer,
) -> Result(
  #(List(test_runner.TestResult), List(#(String, String))),
  String,
)
✨ Search Document