Module

Test.Spec.Runner.Node.Config

Package
purescript-spec-node
Repository
purescript-spec/purescript-spec-node

#OptionParser Source

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 Source

#TestRunConfigRow Source

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

#commandLineOptionParsers Source

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'.

#fromCommandLine Source

#fromCommandLine' Source

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

#toSpecConfig Source

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.