Module

Test.Spec.Runner.Node.Config

#OptionParser

type OptionParser a = Parser (a -> a)

A CLI option parser is implemented as a function that modifies the result rather than returning it. This way we can run multiple parsers in sequence and accumulate the changes on top of defaults, while keeping the result an open (extensible) record.

#TestRunConfig

#TestRunConfig'

#TestRunConfigRow

type TestRunConfigRow :: Row Type -> Row Typetype TestRunConfigRow r = (failFast :: Boolean, filter :: Maybe (String -> Boolean), onlyFailures :: Boolean, timeout :: Maybe Milliseconds | r)

#commandLineOptionParsers

commandLineOptionParsers :: forall r. Array (OptionParser (TestRunConfig' r))

The set of default parsers provided in the box. If you're using your own parsers for your own CLI options, concatenate them to this array before passing to fromCommandLine'.

#defaultConfig

#fromCommandLine

#fromCommandLine'

fromCommandLine' :: forall m a. MonadEffect m => a -> Array (OptionParser a) -> m a

#toSpecConfig

toSpecConfig :: forall m r. MonadAff m => TestRunConfig' r -> m Config

Converts the spec-node configuration to spec configuration. The two are not the same, because this very conversion is an effectful operation, as, for example, it depends on the last test run results.

Modules