diff options
author | RomanCheplyaka <> | 2021-01-13 10:25:00 (GMT) |
---|---|---|
committer | hdiff <hdiff@hdiff.luite.com> | 2021-01-13 10:25:00 (GMT) |
commit | 704fa1f2d217142661e2c45bf16e908243ed8b37 (patch) | |
tree | d263f72c2001fe75e564846a5e2a8428dfd7c1e0 | |
parent | 9ebe898377e753edc14bbb28dfab3887fdffa113 (diff) |
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | Test/Tasty/Runners/Html.hs | 15 | ||||
-rw-r--r-- | tasty-html.cabal | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f24a0..9c0fc0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +0.4.1.4 - 2021-01-13 +-------------------- + +Documentation improvements + 0.4.1.3 - 2021-01-13 -------------------- diff --git a/Test/Tasty/Runners/Html.hs b/Test/Tasty/Runners/Html.hs index a63bf9b..421bc78 100644 --- a/Test/Tasty/Runners/Html.hs +++ b/Test/Tasty/Runners/Html.hs @@ -38,6 +38,7 @@ import Test.Tasty.Runners ) import Test.Tasty.Providers (IsTest, TestName) import qualified Test.Tasty.Runners as Tasty +import qualified Test.Tasty.Ingredients as Tasty import Test.Tasty.Options as Tasty import Text.Blaze.Html5 (Markup, AttributeValue, (!)) import qualified Text.Blaze.Html5 as H @@ -78,6 +79,14 @@ instance IsOption (Maybe AssetsPath) where tests if you pass the @--html@ command line option. For example, @--html=results.html@ will run all the tests and generate @results.html@ as output. + + Note enabling @--html@ will ignore all ingredients following 'htmlRunner'. + If you want to produce the HTML report /in addition/ to other outputs, you can + use 'Tasty.composeReporters', as in + + > main = defaultMainWithIngredients ingredients tests + > where ingredients = [ listingTests, htmlRunner `composeReporters` consoleTestReporter ] + -} htmlRunner :: Ingredient htmlRunner = TestReporter optionDescription $ \options testTree -> do @@ -101,6 +110,12 @@ htmlRunner = TestReporter optionDescription $ \options testTree -> do , Option (Proxy :: Proxy (Maybe AssetsPath)) ] +-- Silence unused import warning +_onlyUsedByHaddock :: () +_onlyUsedByHaddock = () + where _ = Tasty.composeReporters + + -- * Internal -- ** Types diff --git a/tasty-html.cabal b/tasty-html.cabal index 6c3bd0c..905c56e 100644 --- a/tasty-html.cabal +++ b/tasty-html.cabal @@ -1,5 +1,5 @@ name: tasty-html -version: 0.4.1.3 +version: 0.4.1.4 synopsis: Render tasty output to HTML description: A tasty ingredient to output test results in HTML5. license: MIT |