startest/config

Types

pub type Config {
  Config(
    reporters: List(Reporter),
    discover_describe_tests_pattern: Regex,
    discover_standalone_tests_pattern: Regex,
    filters: List(String),
    test_name_pattern: Option(String),
  )
}

Constructors

  • Config(
      reporters: List(Reporter),
      discover_describe_tests_pattern: Regex,
      discover_standalone_tests_pattern: Regex,
      filters: List(String),
      test_name_pattern: Option(String),
    )

    Arguments

    • reporters

      The list of reporters to use to report test results.

    • discover_describe_tests_pattern

      The pattern to use when discovering tests using the describe API.

      If a function’s name matches the pattern it will be evaluated and expected to return a TestTree (like the ones returned by describe or it).

    • discover_standalone_tests_pattern

      The pattern to use when discovering tests defined using standalone functions.

      If a function’s name matches the pattern it will be run as a test.

    • filters

      The list of test filepath filters.

      Each filter is matched against a test file’s path to determine whether the tests in that file should be run.

    • test_name_pattern

      The pattern to use to filter test names.

Functions

pub fn with_discover_describe_tests_pattern(
  config: Config,
  discover_describe_tests_pattern: Regex,
) -> Config

Updates the given Config with the specified discover_describe_tests_pattern.

pub fn with_discover_standalone_tests_pattern(
  config: Config,
  discover_standalone_tests_pattern: Regex,
) -> Config

Updates the given Config with the specified discover_standalone_tests_pattern.

pub fn with_filters(
  config: Config,
  filters: List(String),
) -> Config

Updates the given Config with the specified filters.

pub fn with_test_name_pattern(
  config: Config,
  test_name_pattern: Option(String),
) -> Config

Updates the given Config with the specified test_name_pattern.

Search Document