Introducing `spec-node`, the quality-of-life Node-based runner for `spec`

Recommended as the new default, spec-node is a rich CLI runner that persists test results and takes parameters:

  • --example TEXT or -e TEXT - run only tests whose names include the given text.
  • --example-matches REGEX or -E REGEX - run only tests whose names match the given regex.
  • --fail-fast - stop the run after first failure.
  • --only-failures - run only tests that failed on previous run.
  • --next-failure or -n - run only failed tests and stop on first failure. Equivalent to –fail-fast –only-failures
  • --timeout SECONDS - timeout for each individual test case, in seconds.
  • --no-timeout - each individual test case is allowed to run for as long as it wants.

See the docs: Running | PureScript Spec - The Guide

Meanwhile, spec itself has undergone some related changes:

  • runSpec and runSpecT renamed to runSpecPure and evalSpecT respectively to better convey their true nature.
  • Old versions of runSpec and runSpecT are left in, but deprecated, with the warning pointing to spec-node.
  • evalSpecT still supports the exit config option, still terminates the process with appropriate exit code, but prints a warning that the option is deprecated and will be removed in a future version, and that the consumer is encouraged to migrate to spec-node.

The first consumers of spec-node are the spec and spec-node projects themselves, as well as the new Spago.

6 Likes