hspec-api-2.11.16: A Testing Framework for Haskell
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Test.Hspec.Api.Format.V1

Description

 
Synopsis

Documentation

type Format = Event -> IO () Source #

type Progress = (Int, Int) Source #

(CurrentItem, TotalItems) tuple.

type Path = ([String], String) Source #

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.

Since: hspec-core-2.0.0

data Location Source #

Location is used to represent source locations.

newtype Seconds Source #

Constructors

Seconds Double 

data Item Source #

Instances

Instances details
Show Item Source # 
Instance details

Defined in Test.Hspec.Api.Format.V1.Internal

monadic :: MonadIO m => (m () -> IO ()) -> (Event -> m ()) -> IO Format Source #

Register a formatter

registerFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config Source #

Make a formatter available for use with --format.

useFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config Source #

Make a formatter available for use with --format and use it by default.

liftFormatter :: (String, FormatConfig -> IO Format) -> (String, FormatConfig -> IO Format) Source #

Make a formatter compatible with types from Test.Hspec.Core.Format.

Re-exports

type SpecWith a = SpecM a () Source #

A SpecWith a represents a test or group of tests that require an a value to run.

In the common case, a Spec is a SpecWith () which requires () and can thus be executed with hspec.

To supply an argument to SpecWith tests to turn them into Spec, use functions from Test.Hspec.Core.Hooks such as around, before, mapSubject and similar.

Values of this type are created by it, describe and similar.

modifyConfig :: (Config -> Config) -> SpecWith a Source #

Since: hspec-core-2.10.0