HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehspec-core-2.11.14Haskell2010

Test.Hspec.Core.Formatters.V2

This is an unstable API. Use Test.Hspec.Api.Formatters.V3 instead.

  • 11 types
  • 36 values

Formatters

5 declarations

Implementing a custom Formatter

9 declarations

A formatter is a set of actions. Each action is evaluated when a certain situation is encountered during a test run.

Actions live in the FormatM monad. It provides access to the runner state and primitives for appending to the generated report.

typetype Path = ([String], String)
#

A Path describes the location of a spec item within a spec tree.

It consists of a list of group descriptions and a requirement description.

newtypenewtype FormatM a
#
Instances4Monad, Functor, Applicative, MonadIO
  • Monad FormatMDefined in hspec-core-2.11.14 · Test.Hspec.Core.Formatters.Internal
  • Functor FormatMDefined in hspec-core-2.11.14 · Test.Hspec.Core.Formatters.Internal
  • Applicative FormatMDefined in hspec-core-2.11.14 · Test.Hspec.Core.Formatters.Internal
  • MonadIO FormatMDefined in hspec-core-2.11.14 · Test.Hspec.Core.Formatters.Internal

Accessing config values

datadata FormatConfig
#

Accessing the runner state

Get the number of spec items that will have been encountered when this run completes (if it is not terminated early).

newtypenewtype Seconds
#

Constructors

Instances6Eq, Fractional, Num, Ord, Show, PrintfArg
  • Eq SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock
  • Fractional SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock
  • Num SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock
  • Ord SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock
  • Show SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock
  • PrintfArg SecondsDefined in hspec-core-2.11.14 · Test.Hspec.Core.Clock

Appending to the generated report

Dealing with colors

expert mode

Helpers