Copyright | (C) 2017 Merijn Verstraaten |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Merijn Verstraaten <merijn@inconsistent.nl> |
Stability | experimental |
Portability | haha |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
This module provides a tasty test reporter which functions as a drop-in
replacement for defaultMainWithIngredients
from tasty. It detects whether
the "TRAVIS" environment variable is set to "true". If so, it produces
output as configured. If not, it falls back to the consoleTestReporter
.
Synopsis
- travisTestReporter :: TravisConfig -> [Ingredient] -> TestTree -> IO ()
- data TravisConfig = TravisConfig {
- travisQuiet :: Bool
- travisHideSuccesses :: Bool
- travisUseColour :: Bool
- travisFoldGroup :: FoldGroup
- travisFoldWhen :: FoldWhen
- travisSummaryWhen :: SummaryWhen
- travisTestOptions :: OptionSet -> OptionSet
- defaultConfig :: TravisConfig
- data FoldGroup
- data FoldWhen
- data SummaryWhen
Documentation
travisTestReporter :: TravisConfig -> [Ingredient] -> TestTree -> IO () Source #
A Tasty test runner whose output can be controlled with a TravisConfig
.
Defaults to the regular console reporting when the TRAVIS environment
variable is not set to "true".
Usage:
travisTestReporter
yourConfig [] yourTestTree
data TravisConfig Source #
Configuration for the output generated on Travis CI.
TravisConfig | |
|
defaultConfig :: TravisConfig Source #
Default Travis configuration. Coloured output. Folds all successes away. Adds summaries for folds with failures (which don't happen in this config).
Control which parts of the test tree are folded away.
Control when the tests/groups specified by FoldGroup
are folded.
FoldNever | Never fold output. |
FoldSuccess | Fold all groups that have 0 failures. |
FoldAlways | Always fold groups. |
data SummaryWhen Source #
Control when a summary is printed before a fold.
SummaryNever | Never print summaries. |
SummaryFailures | Print summaries before folds with failures. |
SummaryAlways | Always print summaries before folds. |
Instances
Eq SummaryWhen Source # | |
(==) :: SummaryWhen -> SummaryWhen -> Bool # (/=) :: SummaryWhen -> SummaryWhen -> Bool # | |
Show SummaryWhen Source # | |
showsPrec :: Int -> SummaryWhen -> ShowS # show :: SummaryWhen -> String # showList :: [SummaryWhen] -> ShowS # |