Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Hspec.JUnit.Config
Contents
Synopsis
- data JUnitConfig
- defaultJUnitConfig :: Text -> JUnitConfig
- setJUnitConfigOutputDirectory :: FilePath -> JUnitConfig -> JUnitConfig
- setJUnitConfigOutputName :: FilePath -> JUnitConfig -> JUnitConfig
- setJUnitConfigOutputFile :: FilePath -> JUnitConfig -> JUnitConfig
- setJUnitConfigSuiteName :: Text -> JUnitConfig -> JUnitConfig
- setJUnitConfigSourcePathPrefix :: FilePath -> JUnitConfig -> JUnitConfig
- setJUnitConfigDropConsoleFormatting :: Bool -> JUnitConfig -> JUnitConfig
- getJUnitConfigOutputFile :: JUnitConfig -> FilePath
- getJUnitConfigSuiteName :: JUnitConfig -> Text
- getJUnitPrefixSourcePath :: JUnitConfig -> FilePath -> FilePath
- getJUnitConfigDropConsoleFormatting :: JUnitConfig -> Bool
Documentation
data JUnitConfig Source #
Construction
defaultJUnitConfig :: Text -> JUnitConfig Source #
Construct a JUnitConfig
given a suite name
See individual set functions for defaults.
setJUnitConfigOutputDirectory :: FilePath -> JUnitConfig -> JUnitConfig Source #
Set the directory within which to generate the report
Default is current working directory.
setJUnitConfigOutputName :: FilePath -> JUnitConfig -> JUnitConfig Source #
Set the name for the generated report
Default is junit.xml
.
setJUnitConfigOutputFile :: FilePath -> JUnitConfig -> JUnitConfig Source #
Set the full path to the generated report
If given, the directory and name configurations are ignored.
setJUnitConfigSuiteName :: Text -> JUnitConfig -> JUnitConfig Source #
setJUnitConfigSourcePathPrefix :: FilePath -> JUnitConfig -> JUnitConfig Source #
Set a prefix to apply to source paths in the report
Default is none. This can be required if you run specs from a sub-directory in a monorepository, and you need reported paths to be from the repository root.
setJUnitConfigDropConsoleFormatting :: Bool -> JUnitConfig -> JUnitConfig Source #
Set whether console formatting characters should be dropped from failure reports.
Default is False. Most XML processors will fail to parse the XML if it contains the ANSI control characters used by console formatting.
Use
getJUnitConfigOutputFile :: JUnitConfig -> FilePath Source #
Retrieve the full path to the generated report
getJUnitConfigSuiteName :: JUnitConfig -> Text Source #
Retrieve the suite name given on construction
getJUnitPrefixSourcePath :: JUnitConfig -> FilePath -> FilePath Source #
Retrieve the function to apply to reported source paths
Will be id
if no prefix configured.
getJUnitConfigDropConsoleFormatting :: JUnitConfig -> Bool Source #
Retrieve whether console formatting characters should be dropped from failure reports.