Module

Test.Spec.Runner

#evalSpecT

evalSpecT :: forall m. Functor m => Config -> Array Reporter -> SpecT Aff Unit m Unit -> m (Aff (Array (Tree String Void Result)))

Evaluates the spec tree and returns an action, which, when executed, will run the tests and return the results, which are also reported using specified Reporters, if any.

#run

run :: Warn (Text "`run` is deprecated. Use runSpecAndExitProcess from the \'spec-node\' package instead.") => Array Reporter -> Spec Unit -> Aff Unit

Run the spec with the default config

#runSpec

runSpec :: Warn (Text "`runSpec` is deprecated. Use runSpecAndExitProcess from the \'spec-node\' package instead.") => Array Reporter -> Spec Unit -> Aff Unit

Run the spec with the default config

#runSpec'

runSpec' :: Warn (Text "`runSpec\'` is deprecated. Use runSpecAndExitProcess from the \'spec-node\' package instead.") => Config -> Array Reporter -> Spec Unit -> Aff Unit

#runSpecPure

#runSpecPure'

#runSpecT

runSpecT :: forall m. Functor m => Warn (Text "`runSpecT` is deprecated. Use `runSpecAndExitProcess` from the \'spec-node\' package instead.") => Config -> Array Reporter -> SpecT Aff Unit m Unit -> m (Aff (Array (Tree String Void Result)))

Re-exports from Test.Spec.Config

#TreeFilter

newtype TreeFilter

Constructors

#Config

type Config = { exit :: Boolean, failFast :: Boolean, filterTree :: TreeFilter, slow :: Milliseconds, timeout :: Maybe Milliseconds }

Configuration options for the test runner.

This type defines various settings that control the behavior of the test runner.

Config has the following fields

  • slow: Threshold of time beyond which a test is considered "slow".
  • timeout: An optional timeout, applied to each individual test. When omitted, tests are allowed to run forever.
  • exit: When true, the runner will exit the Node process after running tests. If false, the runner will merely return test results.
  • failFast: When true, first failed test stops the whole run.
  • filterTree: The spec tree goes through this function before execution. Can be used to filter out test cases, rearrange, annotate, etc.

#defaultConfig

Modules