startest/config

Types

pub type Config {
  Config(
    reporters: List(reporters.Reporter),
    discover_describe_tests_pattern: regexp.Regexp,
    discover_standalone_tests_pattern: regexp.Regexp,
    filters: List(String),
    test_name_pattern: option.Option(String),
  )
}

Constructors

  • Config(
      reporters: List(reporters.Reporter),
      discover_describe_tests_pattern: regexp.Regexp,
      discover_standalone_tests_pattern: regexp.Regexp,
      filters: List(String),
      test_name_pattern: option.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.

Values

pub fn with_discover_describe_tests_pattern(
  config: Config,
  discover_describe_tests_pattern: regexp.Regexp,
) -> 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: regexp.Regexp,
) -> 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_reporters(
  config: Config,
  reporters: List(reporters.Reporter),
) -> Config

Updates the given Config with the specified reporters.

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

Updates the given Config with the specified test_name_pattern.

Search Document