mpizenberg / elm-test-runner / ElmTestRunner.SeededRunners

Helper module to prepare and run test runners.


type alias SeededRunners =
Result String { kind : Kind
, runners : Array Test.Runner.Runner 
}

Runners prepared with their random seed. If runners are invalid for some reason (duplicate name, ...), this is will be an Err String. Otherwise, the type tells us if Test.only or Test.skip was used, and provides the seeded runners in an array for efficient indexed access.


type Kind
    = Plain
    | Only
    | Skipping

Informs us if Test.only or Test.skip was used.

empty : SeededRunners

Create an empty SeededRunners when there isn't any test

fromTest : Test -> { initialSeed : Basics.Int, fuzzRuns : Basics.Int, filter : Maybe String } -> SeededRunners

Convert a "master" test into seeded runners. That "master" test usually is the concatenation of all exposed tests.

run : Basics.Int -> Array Test.Runner.Runner -> Maybe ElmTestRunner.Result.TestResult

Run a given test if the id is in range.

kindFromString : String -> Result String Kind

Parse a kind from a String.

kindToString : Kind -> String

Serialize a kind to a String.