Test.Runner.UnitNode.Testing

White-box testing utilities for gren-unit-node itself.

Exposes just enough internals to run a Suite programmatically and inspect its SuiteResult — enabling the self-test suite in tests/. Not intended for use outside this package.

type Outcome
= Passed
| Failed String
| Errored String

A test's outcome with constructors exposed for pattern matching. Mirrors Test.Runner.UnitNode.Outcome exactly.

type alias TestResult =
{ suiteName : String
, name : String
, outcome : Outcome
, durationMs : Int
}

The result of a single test run.

type alias SuiteResult =
{ name : String
, results : Array TestResult
, suiteError : Maybe String
}

The result of a suite run: all test results plus any suite-level lifecycle error (setUpSuite or tearDownSuite failure).

runSuite : Suite -> Task String SuiteResult

Run a suite with all tests selected, returning the result record.

runSuiteFiltered : (String -> Bool) -> Suite -> Task String SuiteResult

Run a suite with a custom name predicate, for testing selection behaviour. The predicate receives fully-qualified names ("SuiteName.testName").