Package

purescript-spec-discovery

Repository
purescript-spec/purescript-spec-discovery
License
MPL-2.0
Uploaded by
pacchettibotti
Published on
2023-08-10T20:00:09Z

purescript-spec-discovery is an extension to purescript-spec that finds specs automatically, given a regular expression pattern.

It only works for NodeJS environments, currently.

Usage

spago install spec-discovery
module Test.Main where

import Prelude
import Effect (Effect)
import Effect.Aff (launchAff_)
import Test.Spec.Discovery (discover)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (runSpec)

main :: Effect Unit
main = launchAff_ do
  specs <- discover """My\.Package\..*Spec"""
  runSpec [consoleReporter] specs

All modules that match the regular expression, and have a definition spec :: Spec Unit, will be included and run.

Documentation

Documentation is publised on Pursuit.

Contribute

If you have any issues or possible improvements please file them as GitHub Issues. Pull requests requests are encouraged.

License

Mozilla Public License Version 2.0.

Modules
Test.Spec.Discovery
Dependencies