| Stability | stable |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Test.Hspec.Api.Format.V1
Contents
Description
Synopsis
- type Format = Event -> IO ()
- data FormatConfig = FormatConfig {
- formatConfigUseColor :: Bool
- formatConfigReportProgress :: Bool
- formatConfigOutputUnicode :: Bool
- formatConfigUseDiff :: Bool
- formatConfigDiffContext :: Maybe Int
- formatConfigExternalDiff :: Maybe (String -> String -> IO ())
- formatConfigPrettyPrint :: Bool
- formatConfigPrettyPrintFunction :: Maybe (String -> String -> (String, String))
- formatConfigPrintTimes :: Bool
- formatConfigHtmlOutput :: Bool
- formatConfigPrintCpuTime :: Bool
- formatConfigUsedSeed :: Integer
- formatConfigExpectedTotalCount :: Int
- data Event
- type Progress = (Int, Int)
- type Path = ([String], String)
- data Location = Location {}
- newtype Seconds = Seconds Double
- data Item = Item {}
- data Result
- data FailureReason
- monadic :: MonadIO m => (m () -> IO ()) -> (Event -> m ()) -> IO Format
- registerFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config
- useFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config
- liftFormatter :: (String, FormatConfig -> IO Format) -> (String, FormatConfig -> IO Format)
- type SpecWith a = SpecM a ()
- data Config
- modifyConfig :: (Config -> Config) -> SpecWith a
Documentation
data FormatConfig Source #
Constructors
| FormatConfig | |
Fields
| |
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
Location is used to represent source locations.
Constructors
| Location | |
Fields
| |
Instances
| PrintfArg Seconds | |
Defined in Test.Hspec.Core.Clock Methods formatArg :: Seconds -> FieldFormatter Source # parseFormat :: Seconds -> ModifierParser Source # | |
| Num Seconds | |
Defined in Test.Hspec.Core.Clock | |
| Fractional Seconds | |
| Show Seconds | |
| Eq Seconds | |
| Ord Seconds | |
Defined in Test.Hspec.Core.Clock | |
Constructors
| Item | |
Fields
| |
data FailureReason Source #
Constructors
| NoReason | |
| Reason String | |
| ExpectedButGot (Maybe String) String String | |
| Error (Maybe String) SomeException |
Instances
| Show FailureReason | |
Defined in Test.Hspec.Core.Formatters.V1.Monad | |
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 represents a test or group of tests that require an SpecWith aa
value to run.
In the common case, a Spec is a which requires SpecWith ()() 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.